pub struct ErrorArena { /* private fields */ }Expand description
Arena for efficient error storage with deduplication
Implementations§
Source§impl ErrorArena
impl ErrorArena
pub fn new() -> Self
pub fn with_capacity(estimated_errors: usize) -> Self
Sourcepub fn insert(&mut self, error: &ExcelError) -> ErrorRef
pub fn insert(&mut self, error: &ExcelError) -> ErrorRef
Store an error and return a reference
Sourcepub fn get(&self, error_ref: ErrorRef) -> Option<ExcelError>
pub fn get(&self, error_ref: ErrorRef) -> Option<ExcelError>
Retrieve an error by reference
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get memory usage statistics
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Debug for ErrorArena
impl Debug for ErrorArena
Auto Trait Implementations§
impl Freeze for ErrorArena
impl RefUnwindSafe for ErrorArena
impl Send for ErrorArena
impl Sync for ErrorArena
impl Unpin for ErrorArena
impl UnsafeUnpin for ErrorArena
impl UnwindSafe for ErrorArena
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