pub struct Taint { /* private fields */ }Expand description
The tainted regions of one allocation, refcounted into the device’s
ErrorGraph.
Implementations§
Source§impl Taint
impl Taint
Sourcepub fn taint(
&mut self,
range: Range<u64>,
failure: FailureId,
failures: &mut ErrorGraph,
)
pub fn taint( &mut self, range: Range<u64>, failure: FailureId, failures: &mut ErrorGraph, )
Point range at failure, releasing whatever claim other failures
held on those bytes: the work that failed is their last writer now,
and whatever the previous writer did or did not do stops mattering.
Tainting is set, never add: re-tainting bytes this failure already claims changes nothing, so a loop failing the same way every iteration cannot grow the claim or pin the node harder. An empty range claims nothing.
Sourcepub fn written(&mut self, range: Range<u64>, failures: &mut ErrorGraph)
pub fn written(&mut self, range: Range<u64>, failures: &mut ErrorGraph)
The bytes in range have a writer again: release every claim on them,
and only on them — a write covering part of a buffer says nothing
about the rest, which keeps carrying the failure that left it stale.
Sourcepub fn failure(&self, range: &Range<u64>) -> Option<FailureId>
pub fn failure(&self, range: &Range<u64>) -> Option<FailureId>
The failure claiming any byte of range, if one does.
A range overlapping several failures names one of them: the read fails either way, and the caller dedupes by id across a whole read anyway.
Sourcepub fn clear(&mut self, failures: &mut ErrorGraph)
pub fn clear(&mut self, failures: &mut ErrorGraph)
Release every claim, for an allocation that stops existing — the slice is rebound, coalesced away, tombstoned or swept — since a tag must not outlive its carrier.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Taint
impl RefUnwindSafe for Taint
impl Send for Taint
impl Sync for Taint
impl Unpin for Taint
impl UnsafeUnpin for Taint
impl UnwindSafe for Taint
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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