MmapSectionStorage

Struct MmapSectionStorage 

Source
pub struct MmapSectionStorage { /* private fields */ }

Implementations§

Source§

impl MmapSectionStorage

Source

pub fn new(buffer: &'static mut [u8], block_size: usize) -> Self

Source

pub fn buffer_ptr(&self) -> *const u8

Trait Implementations§

Source§

impl SectionStorage for MmapSectionStorage

Source§

fn initialize<E: Encode>(&mut self, header: &E) -> Result<usize, EncodeError>

This rewinds the storage, serialize the header and jumps to the beginning of the user data storage.
Source§

fn post_update_header<E: Encode>( &mut self, header: &E, ) -> Result<usize, EncodeError>

This updates the header leaving the position to the end of the user data storage.
Source§

fn append<E: Encode>(&mut self, entry: &E) -> Result<usize, EncodeError>

Appends the entry to the user data storage.
Source§

fn flush(&mut self) -> CuResult<usize>

Flushes the section to the underlying storage
Source§

impl UnifiedLogWrite<MmapSectionStorage> for MmapUnifiedLoggerWrite

Source§

fn add_section( &mut self, entry_type: UnifiedLogType, requested_section_size: usize, ) -> CuResult<SectionHandle<MmapSectionStorage>>

The returned slice is section_size or greater.

Source§

fn flush_section(&mut self, section: &mut SectionHandle<MmapSectionStorage>)

Flush the given section to the underlying storage.
Source§

fn status(&self) -> UnifiedLogStatus

Returns the current status of the unified logger.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.