pub struct ErrorSlot(/* private fields */);Expand description
The first recorded numerical error and its count. The parallel runtime installs the caller’s active slot on workers; checked supplies one for a standalone operation.
Implementations§
Source§impl ErrorSlot
impl ErrorSlot
pub fn new() -> ErrorSlot
pub fn count(&self) -> u64
pub fn pending(&self) -> bool
pub fn take(&self) -> Option<Error>
Sourcepub fn current() -> Option<ErrorSlot>
pub fn current() -> Option<ErrorSlot>
Captured by the parallel runtime before it starts workers.
pub fn within<R>(&self, run: impl FnOnce() -> R) -> R
Trait Implementations§
Auto Trait Implementations§
impl Forget for ErrorSlot
impl Freeze for ErrorSlot
impl RefUnwindSafe for ErrorSlot
impl Send for ErrorSlot
impl Sync for ErrorSlot
impl Unpin for ErrorSlot
impl UnsafeUnpin for ErrorSlot
impl UnwindSafe for ErrorSlot
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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