pub struct EvtxChunk<'chunk> {
pub data: &'chunk [u8],
pub header: &'chunk EvtxChunkHeader,
pub string_cache: StringCache,
pub arena: Bump,
pub settings: Arc<ParserSettings>,
}Expand description
A struct which can hold references to chunk data (EvtxChunkData).
All references are created together,
and can be assume to live for the entire duration of the parsing phase.
See more info about lifetimes in IterChunkRecords.
Fields§
§data: &'chunk [u8]§header: &'chunk EvtxChunkHeader§string_cache: StringCache§arena: Bump§settings: Arc<ParserSettings>Implementations§
Source§impl<'chunk> EvtxChunk<'chunk>
impl<'chunk> EvtxChunk<'chunk>
Sourcepub fn new(
data: &'chunk [u8],
header: &'chunk EvtxChunkHeader,
settings: Arc<ParserSettings>,
) -> Result<EvtxChunk<'chunk>, ChunkError>
pub fn new( data: &'chunk [u8], header: &'chunk EvtxChunkHeader, settings: Arc<ParserSettings>, ) -> Result<EvtxChunk<'chunk>, ChunkError>
Will fail if the data starts with an invalid evtx chunk header.
Sourcepub fn new_with_arena(
data: &'chunk [u8],
header: &'chunk EvtxChunkHeader,
settings: Arc<ParserSettings>,
arena: Bump,
) -> Result<EvtxChunk<'chunk>, ChunkError>
pub fn new_with_arena( data: &'chunk [u8], header: &'chunk EvtxChunkHeader, settings: Arc<ParserSettings>, arena: Bump, ) -> Result<EvtxChunk<'chunk>, ChunkError>
Will fail if the data starts with an invalid evtx chunk header.
The provided arena is reset before use, so any previously allocated chunk-scoped data is cleared while retaining the bump capacity.
Sourcepub fn into_arena(self) -> Bump
pub fn into_arena(self) -> Bump
Consume the chunk and return its bump arena for reuse.
Sourcepub fn iter(&mut self) -> IterChunkRecords<'_> ⓘ
pub fn iter(&mut self) -> IterChunkRecords<'_> ⓘ
Return an iterator of records from the chunk.
See IterChunkRecords for a more detailed explanation regarding the lifetime scopes of the
resulting records.
Trait Implementations§
Auto Trait Implementations§
impl<'chunk> !Freeze for EvtxChunk<'chunk>
impl<'chunk> !RefUnwindSafe for EvtxChunk<'chunk>
impl<'chunk> Send for EvtxChunk<'chunk>
impl<'chunk> !Sync for EvtxChunk<'chunk>
impl<'chunk> Unpin for EvtxChunk<'chunk>
impl<'chunk> !UnwindSafe for EvtxChunk<'chunk>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more