Enum paxakos::error::ShutDownOr
source · pub enum ShutDownOr<E> {
Other(E),
ShutDown,
}
Expand description
Node is shut down.
Variants
Implementations
sourceimpl<E> ShutDownOr<E>
impl<E> ShutDownOr<E>
sourcepub fn map<T, F: FnOnce(E) -> T>(self, f: F) -> ShutDownOr<T>
pub fn map<T, F: FnOnce(E) -> T>(self, f: F) -> ShutDownOr<T>
Applies the mapping function to the other event, if present.
sourcepub fn expect_other(self) -> E
pub fn expect_other(self) -> E
Expect an event other than ‘shut down’ to have occured.
Panics if a shut down occured.
Trait Implementations
sourceimpl<E: Clone> Clone for ShutDownOr<E>
impl<E: Clone> Clone for ShutDownOr<E>
sourcefn clone(&self) -> ShutDownOr<E>
fn clone(&self) -> ShutDownOr<E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<E: Debug> Debug for ShutDownOr<E>
impl<E: Debug> Debug for ShutDownOr<E>
sourceimpl<E> From<E> for ShutDownOr<E>
impl<E> From<E> for ShutDownOr<E>
sourceimpl<I: Invocation> From<ShutDownOr<AbortedError<I>>> for AbortedError<I>
impl<I: Invocation> From<ShutDownOr<AbortedError<I>>> for AbortedError<I>
sourcefn from(err: ShutDownOr<AbortedError<I>>) -> Self
fn from(err: ShutDownOr<AbortedError<I>>) -> Self
Converts to this type from the input type.
sourceimpl<I: Invocation> From<ShutDownOr<AppendError<I>>> for AppendError<I>
impl<I: Invocation> From<ShutDownOr<AppendError<I>>> for AppendError<I>
sourcefn from(e: ShutDownOr<AppendError<I>>) -> Self
fn from(e: ShutDownOr<AppendError<I>>) -> Self
Converts to this type from the input type.
sourceimpl From<ShutDownOr<Infallible>> for ShutDown
impl From<ShutDownOr<Infallible>> for ShutDown
sourcefn from(_: ShutDownOr<Infallible>) -> Self
fn from(_: ShutDownOr<Infallible>) -> Self
Converts to this type from the input type.
impl<E: Copy> Copy for ShutDownOr<E>
Auto Trait Implementations
impl<E> RefUnwindSafe for ShutDownOr<E>where
E: RefUnwindSafe,
impl<E> Send for ShutDownOr<E>where
E: Send,
impl<E> Sync for ShutDownOr<E>where
E: Sync,
impl<E> Unpin for ShutDownOr<E>where
E: Unpin,
impl<E> UnwindSafe for ShutDownOr<E>where
E: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more