pub struct BinaryReader { /* private fields */ }
Expand description
Binary reader for allocation records using buffered I/O
Implementations§
Source§impl BinaryReader
impl BinaryReader
Sourcepub fn new<P: AsRef<Path>>(path: P) -> Result<Self, BinaryExportError>
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self, BinaryExportError>
Create new binary reader for the specified file path
Sourcepub fn read_header(&mut self) -> Result<FileHeader, BinaryExportError>
pub fn read_header(&mut self) -> Result<FileHeader, BinaryExportError>
Read and validate file header
Sourcepub fn read_allocation(&mut self) -> Result<AllocationInfo, BinaryExportError>
pub fn read_allocation(&mut self) -> Result<AllocationInfo, BinaryExportError>
Read single allocation record from current position
Sourcepub fn read_all(&mut self) -> Result<Vec<AllocationInfo>, BinaryExportError>
pub fn read_all(&mut self) -> Result<Vec<AllocationInfo>, BinaryExportError>
Read all allocation records from file with improved error handling
Sourcepub fn get_advanced_metrics(&self) -> Option<&AdvancedMetricsData>
pub fn get_advanced_metrics(&self) -> Option<&AdvancedMetricsData>
Get advanced metrics data if available
Auto Trait Implementations§
impl Freeze for BinaryReader
impl RefUnwindSafe for BinaryReader
impl Send for BinaryReader
impl Sync for BinaryReader
impl Unpin for BinaryReader
impl UnwindSafe for BinaryReader
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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