Enum parity_rpc::dispatch::WithToken
source · [−]pub enum WithToken<T> {
No(T),
Yes(T, AccountToken),
}
Expand description
A value, potentially accompanied by a signing token.
Variants
No(T)
No token.
Yes(T, AccountToken)
With token.
Implementations
sourceimpl<T: Debug> WithToken<T>
impl<T: Debug> WithToken<T>
sourcepub fn map<S, F>(self, f: F) -> WithToken<S> where
S: Debug,
F: FnOnce(T) -> S,
pub fn map<S, F>(self, f: F) -> WithToken<S> where
S: Debug,
F: FnOnce(T) -> S,
Map the value with the given closure, preserving the token.
sourcepub fn into_value(self) -> T
pub fn into_value(self) -> T
Convert into inner value, ignoring possible token.
sourcepub fn into_tuple(self) -> (T, Option<AccountToken>)
pub fn into_tuple(self) -> (T, Option<AccountToken>)
Convert the WithToken
into a tuple.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for WithToken<T> where
T: RefUnwindSafe,
impl<T> Send for WithToken<T> where
T: Send,
impl<T> Sync for WithToken<T> where
T: Sync,
impl<T> Unpin for WithToken<T> where
T: Unpin,
impl<T> UnwindSafe for WithToken<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more