UnifiedLogWrite

Trait UnifiedLogWrite 

pub trait UnifiedLogWrite<S>: Send + Sync
where S: SectionStorage,
{ // Required methods fn add_section( &mut self, entry_type: UnifiedLogType, requested_section_size: usize, ) -> Result<SectionHandle<S>, CuError>; fn flush_section(&mut self, section: &mut SectionHandle<S>); fn status(&self) -> UnifiedLogStatus; }
Expand description

The writing interface to the unified logger. Writing is “almost” linear as various streams can allocate sections and track them until they drop them.

Required Methods§

fn add_section( &mut self, entry_type: UnifiedLogType, requested_section_size: usize, ) -> Result<SectionHandle<S>, CuError>

A section is a contiguous chunk of memory that can be used to write data. It can store various types of data as specified by the entry_type. The requested_section_size is the size of the section to allocate. It returns a handle to the section that can be used to write data until it is flushed with flush_section, it is then considered unmutable.

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

Flush the given section to the underlying storage.

fn status(&self) -> UnifiedLogStatus

Returns the current status of the unified logger.

Implementors§