pub struct ScriptAny(/* private fields */);
Implementations§
Source§impl ScriptAny
impl ScriptAny
Sourcepub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
Sourcepub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes using canonical CBOR encodings
Sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<ScriptAny, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<ScriptAny, JsError>
- Create this type from CBOR bytes
Sourcepub fn to_cbor_hex(&self) -> String
pub fn to_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
Sourcepub fn to_canonical_cbor_hex(&self) -> String
pub fn to_canonical_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
Source§impl ScriptAny
impl ScriptAny
pub fn native_scripts(&self) -> NativeScriptList
pub fn new(native_scripts: &NativeScriptList) -> Self
Trait Implementations§
Source§impl FromWasmAbi for ScriptAny
impl FromWasmAbi for ScriptAny
Source§impl IntoWasmAbi for ScriptAny
impl IntoWasmAbi for ScriptAny
Source§impl LongRefFromWasmAbi for ScriptAny
impl LongRefFromWasmAbi for ScriptAny
Source§impl OptionFromWasmAbi for ScriptAny
impl OptionFromWasmAbi for ScriptAny
Source§impl OptionIntoWasmAbi for ScriptAny
impl OptionIntoWasmAbi for ScriptAny
Source§impl RefFromWasmAbi for ScriptAny
impl RefFromWasmAbi for ScriptAny
Source§impl RefMutFromWasmAbi for ScriptAny
impl RefMutFromWasmAbi for ScriptAny
Source§impl TryFromJsValue for ScriptAny
impl TryFromJsValue for ScriptAny
Source§impl VectorFromWasmAbi for ScriptAny
impl VectorFromWasmAbi for ScriptAny
Source§impl VectorIntoWasmAbi for ScriptAny
impl VectorIntoWasmAbi for ScriptAny
impl SupportsConstructor for ScriptAny
impl SupportsInstanceProperty for ScriptAny
impl SupportsStaticProperty for ScriptAny
Auto Trait Implementations§
impl Freeze for ScriptAny
impl RefUnwindSafe for ScriptAny
impl Send for ScriptAny
impl Sync for ScriptAny
impl Unpin for ScriptAny
impl UnwindSafe for ScriptAny
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
.