pub struct Header { /* private fields */ }Expand description
EZLog file Header
every log file starts with a header, which is used to describe the version, log length, compress type, cipher kind and so on.
Implementations§
Source§impl Header
impl Header
pub fn new() -> Self
pub fn empty() -> Self
pub fn create(config: &EZLogConfig) -> Self
pub fn max_length() -> usize
pub fn length_compat(version: &Version) -> usize
pub fn length(&self) -> usize
pub fn encode(&self, writer: &mut dyn Write) -> Result<(), Error>
pub fn encode_v1(&self, writer: &mut dyn Write) -> Result<(), Error>
pub fn encode_v2(&self, writer: &mut dyn Write) -> Result<(), Error>
pub fn decode(reader: &mut dyn Read) -> Result<Self, LogError>
pub fn decode_and_config( reader: &mut dyn Read, config: &EZLogConfig, ) -> Result<Self, LogError>
pub fn is_match(&self, config: &EZLogConfig) -> bool
pub fn is_empty(&self) -> bool
pub fn is_config(&self) -> bool
pub fn has_record(&self) -> bool
pub fn has_record_exclude_extra(&self, config: &EZLogConfig) -> bool
pub fn version(&self) -> &Version
Trait Implementations§
impl Eq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more