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, E> Clone for MotokoResult<T, E>
impl<T, E> Clone for MotokoResult<T, E>
Source§fn clone(&self) -> MotokoResult<T, E>
fn clone(&self) -> MotokoResult<T, E>
Returns a duplicate 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<T, E> Debug for MotokoResult<T, E>
impl<T, E> Debug for MotokoResult<T, E>
Source§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<MotokoResult<T, E>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MotokoResult<T, E>, <__D as Deserializer<'de>>::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>
Source§fn from(r: Result<T, E>) -> MotokoResult<T, E>
fn from(r: Result<T, E>) -> MotokoResult<T, E>
Converts to this type from the input type.
Source§impl<T, E> Serialize for MotokoResult<T, E>
impl<T, E> Serialize for MotokoResult<T, E>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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