pub enum NetworkAttempt<T> {
Performed(NetworkResult<T>),
Skipped,
}Expand description
Whether a network operation was performed at all.
Sibling to NetworkResult, one layer out: every NetworkResult variant
asserts something about the remote, so declining to act needs a variant of its
own. Result<NetworkAttempt<T>, E> covers all three cases: Err for our own
fault, Skipped for a deliberate choice not to act, Performed for anything
the remote had a part in.
Variants§
Performed(NetworkResult<T>)
The operation happened; the result describes how it went
Skipped
Deliberately not performed. Carries no information about the remote: it must not count against their contact methods, their liveness, or any route or relay built on them.
Implementations§
Source§impl<T> NetworkAttempt<T>
impl<T> NetworkAttempt<T>
Trait Implementations§
Source§impl<T: Debug> Debug for NetworkAttempt<T>
impl<T: Debug> Debug for NetworkAttempt<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for NetworkAttempt<T>
impl<T> !UnwindSafe for NetworkAttempt<T>
impl<T> Freeze for NetworkAttempt<T>where
NetworkResult<T>: Freeze,
impl<T> Send for NetworkAttempt<T>where
NetworkResult<T>: Send,
impl<T> Sync for NetworkAttempt<T>where
NetworkResult<T>: Sync,
impl<T> Unpin for NetworkAttempt<T>where
NetworkResult<T>: Unpin,
impl<T> UnsafeUnpin for NetworkAttempt<T>where
NetworkResult<T>: UnsafeUnpin,
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> 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