pub struct ScriptHash(/* private fields */);
Implementations§
Source§impl ScriptHash
impl ScriptHash
Source§impl ScriptHash
impl ScriptHash
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<ScriptHash, JsError>
pub fn from_raw_bytes(bytes: &[u8]) -> Result<ScriptHash, JsError>
- Parse from the direct raw bytes, without any CBOR structure
Trait Implementations§
Source§impl AsRef<ScriptHash> for ScriptHash
impl AsRef<ScriptHash> for ScriptHash
Source§fn as_ref(&self) -> &ScriptHash
fn as_ref(&self) -> &ScriptHash
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for ScriptHash
impl Clone for ScriptHash
Source§fn clone(&self) -> ScriptHash
fn clone(&self) -> ScriptHash
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 Debug for ScriptHash
impl Debug for ScriptHash
Source§impl From<ScriptHash> for JsValue
impl From<ScriptHash> for JsValue
Source§fn from(value: ScriptHash) -> JsValue
fn from(value: ScriptHash) -> JsValue
Converts to this type from the input type.
Source§impl From<ScriptHash> for ScriptHash
impl From<ScriptHash> for ScriptHash
Source§fn from(inner: ScriptHash) -> ScriptHash
fn from(inner: ScriptHash) -> ScriptHash
Converts to this type from the input type.
Source§impl FromWasmAbi for ScriptHash
impl FromWasmAbi for ScriptHash
Source§impl IntoWasmAbi for ScriptHash
impl IntoWasmAbi for ScriptHash
Source§impl LongRefFromWasmAbi for ScriptHash
impl LongRefFromWasmAbi for ScriptHash
Source§type Anchor = RcRef<ScriptHash>
type Anchor = RcRef<ScriptHash>
Same as
RefFromWasmAbi::Anchor
Source§unsafe fn long_ref_from_abi(
js: <ScriptHash as LongRefFromWasmAbi>::Abi,
) -> <ScriptHash as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <ScriptHash as LongRefFromWasmAbi>::Abi, ) -> <ScriptHash as LongRefFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi
Source§impl OptionFromWasmAbi for ScriptHash
impl OptionFromWasmAbi for ScriptHash
Source§fn is_none(abi: &<ScriptHash as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<ScriptHash as FromWasmAbi>::Abi) -> bool
Tests whether the argument is a “none” instance. If so it will be
deserialized as
None
, and otherwise it will be passed to
FromWasmAbi
.Source§impl OptionIntoWasmAbi for ScriptHash
impl OptionIntoWasmAbi for ScriptHash
Source§fn none() -> <ScriptHash as IntoWasmAbi>::Abi
fn none() -> <ScriptHash as IntoWasmAbi>::Abi
Returns an ABI instance indicating “none”, which JS will interpret as
the
None
branch of this option. Read moreSource§impl RefFromWasmAbi for ScriptHash
impl RefFromWasmAbi for ScriptHash
Source§type Anchor = RcRef<ScriptHash>
type Anchor = RcRef<ScriptHash>
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: <ScriptHash as RefFromWasmAbi>::Abi,
) -> <ScriptHash as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <ScriptHash as RefFromWasmAbi>::Abi, ) -> <ScriptHash as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for ScriptHash
impl RefMutFromWasmAbi for ScriptHash
Source§type Anchor = RcRefMut<ScriptHash>
type Anchor = RcRefMut<ScriptHash>
Same as
RefFromWasmAbi::Anchor
Source§unsafe fn ref_mut_from_abi(
js: <ScriptHash as RefMutFromWasmAbi>::Abi,
) -> <ScriptHash as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <ScriptHash as RefMutFromWasmAbi>::Abi, ) -> <ScriptHash as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abi
Source§impl TryFromJsValue for ScriptHash
impl TryFromJsValue for ScriptHash
Source§fn try_from_js_value(
value: JsValue,
) -> Result<ScriptHash, <ScriptHash as TryFromJsValue>::Error>
fn try_from_js_value( value: JsValue, ) -> Result<ScriptHash, <ScriptHash as TryFromJsValue>::Error>
Performs the conversion.
Source§impl VectorFromWasmAbi for ScriptHash
impl VectorFromWasmAbi for ScriptHash
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <ScriptHash as VectorFromWasmAbi>::Abi, ) -> Box<[ScriptHash]>
Source§impl VectorIntoWasmAbi for ScriptHash
impl VectorIntoWasmAbi for ScriptHash
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[ScriptHash]>, ) -> <ScriptHash as VectorIntoWasmAbi>::Abi
Auto Trait Implementations§
impl Freeze for ScriptHash
impl RefUnwindSafe for ScriptHash
impl Send for ScriptHash
impl Sync for ScriptHash
impl Unpin for ScriptHash
impl UnwindSafe for ScriptHash
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::Abi
Source§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
.