pub enum Transaction {
V1(TransactionV1),
}Expand description
Transaction
§BCS
The BCS serialized form for this type is defined by the following ABNF:
transaction = %x00 transaction-v1
transaction-v1 = transaction-kind address gas-payment transaction-expirationVariants§
V1(TransactionV1)
Implementations§
Source§impl Transaction
impl Transaction
pub fn digest(&self) -> Digest
Available on crate features
hash and serde only.Sourcepub fn to_bcs(&self) -> Vec<u8> ⓘ
Available on crate features hash and serde only.
pub fn to_bcs(&self) -> Vec<u8> ⓘ
hash and serde only.Serialize the transaction as a Vec<u8> of BCS bytes.
Sourcepub fn to_base64(&self) -> String
Available on crate features hash and serde only.
pub fn to_base64(&self) -> String
hash and serde only.Serialize the transaction as a base64-encoded string.
Sourcepub fn from_bcs(bytes: &[u8]) -> Result<Self, Error>
Available on crate features hash and serde only.
pub fn from_bcs(bytes: &[u8]) -> Result<Self, Error>
hash and serde only.Deserialize a transaction from a Vec<u8> of BCS bytes.
Sourcepub fn from_base64(bytes: &str) -> Result<Self, Error>
Available on crate features hash and serde only.
pub fn from_base64(bytes: &str) -> Result<Self, Error>
hash and serde only.Deserialize a transaction from a base64-encoded string.
Source§impl Transaction
impl Transaction
pub fn signing_digest(&self) -> SigningDigest
Available on crate features
hash and serde only.pub fn signing_digest_hex(&self) -> String
Available on crate features
hash and serde only.Source§impl Transaction
impl Transaction
pub fn is_v1(&self) -> bool
pub fn as_v1(&self) -> &TransactionV1
pub fn as_v1_opt(&self) -> Option<&TransactionV1>
pub fn into_v1_opt(self) -> Option<TransactionV1>
pub fn into_v1(self) -> TransactionV1
Trait Implementations§
Source§impl Arbitrary for Transaction
impl Arbitrary for Transaction
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<Transaction>
type Strategy = BoxedStrategy<Transaction>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
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 Transaction
impl Debug for Transaction
Source§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<TransactionV1> for Transaction
impl From<TransactionV1> for Transaction
Source§fn from(v1: TransactionV1) -> Self
fn from(v1: TransactionV1) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for Transaction
impl JsonSchema for Transaction
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for Transaction
impl PartialEq for Transaction
Source§impl Serialize for Transaction
impl Serialize for Transaction
impl Eq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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 more