pub struct SectionHeaderBlock<'a> {
pub endianness: Endianness,
pub major_version: u16,
pub minor_version: u16,
pub section_length: i64,
pub options: Vec<SectionHeaderOption<'a>>,
}
Expand description
Section Header Block: it defines the most important characteristics of the capture file.
Fields§
§endianness: Endianness
Endianness of the section.
major_version: u16
Major version of the format. Current value is 1.
minor_version: u16
Minor version of the format. Current value is 0.
section_length: i64
Length in bytes of the following section excluding this block.
This block can be used to skip the section for faster navigation in large files. Length of -1i64 means that the length is unspecified.
options: Vec<SectionHeaderOption<'a>>
Options
Implementations§
Source§impl<'a> SectionHeaderBlock<'a>
impl<'a> SectionHeaderBlock<'a>
Sourcepub fn into_owned(self) -> SectionHeaderBlock<'static>
pub fn into_owned(self) -> SectionHeaderBlock<'static>
Returns a version of self
with all fields converted to owning versions.
Trait Implementations§
Source§impl<'a> Clone for SectionHeaderBlock<'a>
impl<'a> Clone for SectionHeaderBlock<'a>
Source§fn clone(&self) -> SectionHeaderBlock<'a>
fn clone(&self) -> SectionHeaderBlock<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for SectionHeaderBlock<'a>
impl<'a> Debug for SectionHeaderBlock<'a>
Source§impl Default for SectionHeaderBlock<'static>
impl Default for SectionHeaderBlock<'static>
Source§impl<'a> PartialEq for SectionHeaderBlock<'a>
impl<'a> PartialEq for SectionHeaderBlock<'a>
Source§impl<'a> PcapNgBlock<'a> for SectionHeaderBlock<'a>
impl<'a> PcapNgBlock<'a> for SectionHeaderBlock<'a>
Source§fn from_slice<B: ByteOrder>(
slice: &'a [u8],
) -> Result<(&'a [u8], Self), PcapError>
fn from_slice<B: ByteOrder>( slice: &'a [u8], ) -> Result<(&'a [u8], Self), PcapError>
Parse a new block from a slice
Source§fn write_to<B: ByteOrder, W: Write>(&self, writer: &mut W) -> IoResult<usize>
fn write_to<B: ByteOrder, W: Write>(&self, writer: &mut W) -> IoResult<usize>
Write the content of a block into a writer
Source§fn into_block(self) -> Block<'a>
fn into_block(self) -> Block<'a>
Convert a block into the
Block
enumerationimpl<'a> Eq for SectionHeaderBlock<'a>
impl<'a> StructuralPartialEq for SectionHeaderBlock<'a>
Auto Trait Implementations§
impl<'a> Freeze for SectionHeaderBlock<'a>
impl<'a> RefUnwindSafe for SectionHeaderBlock<'a>
impl<'a> Send for SectionHeaderBlock<'a>
impl<'a> Sync for SectionHeaderBlock<'a>
impl<'a> Unpin for SectionHeaderBlock<'a>
impl<'a> UnwindSafe for SectionHeaderBlock<'a>
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