pub struct AuxiliaryData(/* private fields */);
Implementations§
Source§impl AuxiliaryData
impl AuxiliaryData
pub fn new() -> Self
pub fn metadata(&self) -> Option<Metadata>
pub fn native_scripts(&self) -> Option<NativeScriptList>
pub fn plutus_v1_scripts(&self) -> Option<PlutusV1ScriptList>
pub fn plutus_v2_scripts(&self) -> Option<PlutusV2ScriptList>
Sourcepub fn add_metadata(&mut self, other: &Metadata)
pub fn add_metadata(&mut self, other: &Metadata)
Warning: overwrites any conflicting metadatum labels present
Sourcepub fn add_native_scripts(&mut self, scripts: &NativeScriptList)
pub fn add_native_scripts(&mut self, scripts: &NativeScriptList)
Warning: does not check for duplicates and may migrate eras
Sourcepub fn add_plutus_v1_scripts(&mut self, scripts: &PlutusV1ScriptList)
pub fn add_plutus_v1_scripts(&mut self, scripts: &PlutusV1ScriptList)
Warning: does not check for duplicates and may migrate eras
Sourcepub fn add_plutus_v2_scripts(&mut self, scripts: &PlutusV2ScriptList)
pub fn add_plutus_v2_scripts(&mut self, scripts: &PlutusV2ScriptList)
Warning: does not check for duplicates and may migrate eras
Sourcepub fn add(&mut self, other: &AuxiliaryData)
pub fn add(&mut self, other: &AuxiliaryData)
Adds everything present in other to self May change the era the aux data is in if necessary Warning: overwrites any metadatum labels present also does not check for duplicates in scripts
Source§impl AuxiliaryData
impl AuxiliaryData
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<AuxiliaryData, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<AuxiliaryData, 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
Sourcepub fn from_cbor_hex(cbor_bytes: &str) -> Result<AuxiliaryData, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<AuxiliaryData, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
Source§impl AuxiliaryData
impl AuxiliaryData
Source§impl AuxiliaryData
impl AuxiliaryData
pub fn new_shelley(shelley: &ShelleyFormatAuxData) -> Self
pub fn new_shelley_ma(shelley_ma: &ShelleyMAFormatAuxData) -> Self
pub fn new_conway(conway: &ConwayFormatAuxData) -> Self
pub fn kind(&self) -> AuxiliaryDataKind
pub fn as_shelley(&self) -> Option<ShelleyFormatAuxData>
pub fn as_shelley_ma(&self) -> Option<ShelleyMAFormatAuxData>
pub fn as_conway(&self) -> Option<ConwayFormatAuxData>
Trait Implementations§
Source§impl AsRef<AuxiliaryData> for AuxiliaryData
impl AsRef<AuxiliaryData> for AuxiliaryData
Source§fn as_ref(&self) -> &AuxiliaryData
fn as_ref(&self) -> &AuxiliaryData
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for AuxiliaryData
impl Clone for AuxiliaryData
Source§fn clone(&self) -> AuxiliaryData
fn clone(&self) -> AuxiliaryData
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 AuxiliaryData
impl Debug for AuxiliaryData
Source§impl From<AuxiliaryData> for AuxiliaryData
impl From<AuxiliaryData> for AuxiliaryData
Source§fn from(native: AuxiliaryData) -> Self
fn from(native: AuxiliaryData) -> Self
Converts to this type from the input type.
Source§impl From<AuxiliaryData> for JsValue
impl From<AuxiliaryData> for JsValue
Source§fn from(value: AuxiliaryData) -> Self
fn from(value: AuxiliaryData) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for AuxiliaryData
impl FromWasmAbi for AuxiliaryData
Source§impl Into<AuxiliaryData> for AuxiliaryData
impl Into<AuxiliaryData> for AuxiliaryData
Source§fn into(self) -> AuxiliaryData
fn into(self) -> AuxiliaryData
Converts this type into the (usually inferred) input type.
Source§impl IntoWasmAbi for AuxiliaryData
impl IntoWasmAbi for AuxiliaryData
Source§impl LongRefFromWasmAbi for AuxiliaryData
impl LongRefFromWasmAbi for AuxiliaryData
Source§impl OptionFromWasmAbi for AuxiliaryData
impl OptionFromWasmAbi for AuxiliaryData
Source§impl OptionIntoWasmAbi for AuxiliaryData
impl OptionIntoWasmAbi for AuxiliaryData
Source§impl RefFromWasmAbi for AuxiliaryData
impl RefFromWasmAbi for AuxiliaryData
Source§type Anchor = RcRef<AuxiliaryData>
type Anchor = RcRef<AuxiliaryData>
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§impl RefMutFromWasmAbi for AuxiliaryData
impl RefMutFromWasmAbi for AuxiliaryData
Source§impl TryFromJsValue for AuxiliaryData
impl TryFromJsValue for AuxiliaryData
Source§impl VectorFromWasmAbi for AuxiliaryData
impl VectorFromWasmAbi for AuxiliaryData
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[AuxiliaryData]>
Source§impl VectorIntoJsValue for AuxiliaryData
impl VectorIntoJsValue for AuxiliaryData
fn vector_into_jsvalue(vector: Box<[AuxiliaryData]>) -> JsValue
Source§impl VectorIntoWasmAbi for AuxiliaryData
impl VectorIntoWasmAbi for AuxiliaryData
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[AuxiliaryData]>) -> Self::Abi
Source§impl WasmDescribeVector for AuxiliaryData
impl WasmDescribeVector for AuxiliaryData
impl SupportsConstructor for AuxiliaryData
impl SupportsInstanceProperty for AuxiliaryData
impl SupportsStaticProperty for AuxiliaryData
Auto Trait Implementations§
impl Freeze for AuxiliaryData
impl RefUnwindSafe for AuxiliaryData
impl Send for AuxiliaryData
impl Sync for AuxiliaryData
impl Unpin for AuxiliaryData
impl UnwindSafe for AuxiliaryData
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
.