pub struct DatumHash(/* private fields */);Implementations§
Source§impl DatumHash
impl DatumHash
Sourcepub fn to_raw_bytes(&self) -> Vec<u8> ⓘ
pub fn to_raw_bytes(&self) -> Vec<u8> ⓘ
- Direct raw bytes without any CBOR structure
Sourcepub fn from_raw_bytes(bytes: &[u8]) -> Result<DatumHash, JsError>
pub fn from_raw_bytes(bytes: &[u8]) -> Result<DatumHash, JsError>
- Parse from the direct raw bytes, without any CBOR structure
Trait Implementations§
Source§impl FromWasmAbi for DatumHash
impl FromWasmAbi for DatumHash
Source§impl IntoWasmAbi for DatumHash
impl IntoWasmAbi for DatumHash
Source§impl LongRefFromWasmAbi for DatumHash
impl LongRefFromWasmAbi for DatumHash
Source§impl OptionFromWasmAbi for DatumHash
impl OptionFromWasmAbi for DatumHash
Source§impl OptionIntoWasmAbi for DatumHash
impl OptionIntoWasmAbi for DatumHash
Source§impl RefFromWasmAbi for DatumHash
impl RefFromWasmAbi for DatumHash
Source§type Anchor = RcRef<DatumHash>
type Anchor = RcRef<DatumHash>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§unsafe fn ref_from_abi(
js: <DatumHash as RefFromWasmAbi>::Abi,
) -> <DatumHash as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <DatumHash as RefFromWasmAbi>::Abi, ) -> <DatumHash as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for DatumHash
impl RefMutFromWasmAbi for DatumHash
Source§impl TryFromJsValue for DatumHash
impl TryFromJsValue for DatumHash
Source§impl VectorFromWasmAbi for DatumHash
impl VectorFromWasmAbi for DatumHash
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <DatumHash as VectorFromWasmAbi>::Abi, ) -> Box<[DatumHash]>
Source§impl VectorIntoWasmAbi for DatumHash
impl VectorIntoWasmAbi for DatumHash
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[DatumHash]>, ) -> <DatumHash as VectorIntoWasmAbi>::Abi
Auto Trait Implementations§
impl Freeze for DatumHash
impl RefUnwindSafe for DatumHash
impl Send for DatumHash
impl Sync for DatumHash
impl Unpin for DatumHash
impl UnwindSafe for DatumHash
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§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 moreSource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.