Enum nix_compat::nar::reader::ArchiveReaderStatus
source · enum ArchiveReaderStatus<'a> {
StackTop {
poisoned: bool,
ready: bool,
},
StackChild {
poisoned: &'a mut bool,
parent_ready: &'a mut bool,
ready: bool,
},
}
Expand description
We use a stack of statuses to:
- Share poisoned state across all objects from the same underlying reader, so we can check they are abandoned when an error occurs
- Make sure only the most recently created object is read from, and is fully exhausted before anything it was created from is used again.
Variants§
Implementations§
source§impl ArchiveReaderStatus<'_>
impl ArchiveReaderStatus<'_>
fn top() -> Self
sourcefn poison(&mut self)
fn poison(&mut self)
Poison all the objects sharing the same reader, to be used when an error occurs
sourcefn ready_parent(&mut self)
fn ready_parent(&mut self)
Mark the parent as ready, allowing it to be used again and preventing this reference to the reader being used again.
fn poisoned(&self) -> bool
fn ready(&self) -> bool
Auto Trait Implementations§
impl<'a> Freeze for ArchiveReaderStatus<'a>
impl<'a> RefUnwindSafe for ArchiveReaderStatus<'a>
impl<'a> Send for ArchiveReaderStatus<'a>
impl<'a> Sync for ArchiveReaderStatus<'a>
impl<'a> Unpin for ArchiveReaderStatus<'a>
impl<'a> !UnwindSafe for ArchiveReaderStatus<'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