UnifiedLogWrite

Trait UnifiedLogWrite 

Source
pub trait UnifiedLogWrite<S: SectionStorage>: Send + Sync {
    // Required methods
    fn add_section(
        &mut self,
        entry_type: UnifiedLogType,
        requested_section_size: usize,
    ) -> CuResult<SectionHandle<S>>;
    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§

Source

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

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.

Source

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

Flush the given section to the underlying storage.

Source

fn status(&self) -> UnifiedLogStatus

Returns the current status of the unified logger.

Implementors§