Enum paxakos::error::ShutDownOr
source · [−]pub enum ShutDownOr<E> {
Other(E),
ShutDown,
}
Expand description
Node is shut down.
Variants
Other(E)
An event other than ‘shut down’ occured.
ShutDown
Node is shut down.
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 more
sourceimpl<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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more