Enum candid::types::result::MotokoResult
source · pub enum MotokoResult<T, E> {
ok(T),
err(E),
}
Variants§
Implementations§
source§impl<T, E> MotokoResult<T, E>
impl<T, E> MotokoResult<T, E>
pub fn into_result(self) -> Result<T, E>
Trait Implementations§
source§impl<T, E> CandidType for MotokoResult<T, E>where
T: CandidType,
E: CandidType,
impl<T, E> CandidType for MotokoResult<T, E>where
T: CandidType,
E: CandidType,
source§impl<T: Clone, E: Clone> Clone for MotokoResult<T, E>
impl<T: Clone, E: Clone> Clone for MotokoResult<T, E>
source§fn clone(&self) -> MotokoResult<T, E>
fn clone(&self) -> MotokoResult<T, E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'de, T, E> Deserialize<'de> for MotokoResult<T, E>where
T: Deserialize<'de>,
E: Deserialize<'de>,
impl<'de, T, E> Deserialize<'de> for MotokoResult<T, E>where
T: Deserialize<'de>,
E: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T, E> From<Result<T, E>> for MotokoResult<T, E>
impl<T, E> From<Result<T, E>> for MotokoResult<T, E>
Auto Trait Implementations§
impl<T, E> Freeze for MotokoResult<T, E>
impl<T, E> RefUnwindSafe for MotokoResult<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for MotokoResult<T, E>
impl<T, E> Sync for MotokoResult<T, E>
impl<T, E> Unpin for MotokoResult<T, E>
impl<T, E> UnwindSafe for MotokoResult<T, E>where
T: UnwindSafe,
E: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)