pub struct Block(/* private fields */);Implementations§
Source§impl Block
impl Block
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<Block, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<Block, 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 Block
impl Block
pub fn header(&self) -> Header
pub fn transaction_bodies(&self) -> TransactionBodyList
pub fn transaction_witness_sets(&self) -> TransactionWitnessSetList
pub fn auxiliary_data_set(&self) -> MapTransactionIndexToAuxiliaryData
pub fn invalid_transactions(&self) -> Vec<TransactionIndex> ⓘ
pub fn new( header: &Header, transaction_bodies: &TransactionBodyList, transaction_witness_sets: &TransactionWitnessSetList, auxiliary_data_set: &MapTransactionIndexToAuxiliaryData, invalid_transactions: Vec<TransactionIndex>, ) -> Self
Trait Implementations§
Source§impl FromWasmAbi for Block
impl FromWasmAbi for Block
Source§impl IntoWasmAbi for Block
impl IntoWasmAbi for Block
Source§impl LongRefFromWasmAbi for Block
impl LongRefFromWasmAbi for Block
Source§impl OptionFromWasmAbi for Block
impl OptionFromWasmAbi for Block
Source§impl OptionIntoWasmAbi for Block
impl OptionIntoWasmAbi for Block
Source§impl RefFromWasmAbi for Block
impl RefFromWasmAbi for Block
Source§impl RefMutFromWasmAbi for Block
impl RefMutFromWasmAbi for Block
Source§impl TryFromJsValue for Block
impl TryFromJsValue for Block
Source§impl VectorFromWasmAbi for Block
impl VectorFromWasmAbi for Block
Source§impl VectorIntoWasmAbi for Block
impl VectorIntoWasmAbi for Block
impl SupportsConstructor for Block
impl SupportsInstanceProperty for Block
impl SupportsStaticProperty for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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.