Struct Transaction
#[non_exhaustive]pub struct Transaction {
pub bcs: Option<Bcs>,
pub digest: Option<String>,
pub version: Option<i32>,
pub kind: Option<TransactionKind>,
pub sender: Option<String>,
pub gas_payment: Option<GasPayment>,
pub expiration: Option<TransactionExpiration>,
}
Expand description
A transaction.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.bcs: Option<Bcs>
This Transaction serialized as BCS.
digest: Option<String>
The digest of this Transaction.
version: Option<i32>
Version of this Transaction.
kind: Option<TransactionKind>
§sender: Option<String>
§gas_payment: Option<GasPayment>
§expiration: Option<TransactionExpiration>
Implementations§
§impl Transaction
impl Transaction
§impl Transaction
impl Transaction
pub const BCS_FIELD: &'static MessageField
pub const DIGEST_FIELD: &'static MessageField
pub const VERSION_FIELD: &'static MessageField
pub const KIND_FIELD: &'static MessageField
pub const SENDER_FIELD: &'static MessageField
pub const GAS_PAYMENT_FIELD: &'static MessageField
pub const EXPIRATION_FIELD: &'static MessageField
§impl Transaction
impl Transaction
pub fn path_builder() -> TransactionFieldPathBuilder
§impl Transaction
impl Transaction
pub const fn const_default() -> Transaction
pub fn bcs_opt_mut(&mut self) -> Option<&mut Bcs>
pub fn bcs_opt_mut(&mut self) -> Option<&mut Bcs>
pub fn bcs_mut(&mut self) -> &mut Bcs
pub fn bcs_mut(&mut self) -> &mut Bcs
Returns a mutable reference to bcs
.
If the field is unset, it is first initialized with the default value.
pub fn with_bcs<T>(self, field: T) -> Transaction
pub fn with_bcs<T>(self, field: T) -> Transaction
Sets bcs
with the provided value.
pub fn digest_opt_mut(&mut self) -> Option<&mut String>
pub fn digest_opt_mut(&mut self) -> Option<&mut String>
pub fn digest_mut(&mut self) -> &mut String
pub fn digest_mut(&mut self) -> &mut String
Returns a mutable reference to digest
.
If the field is unset, it is first initialized with the default value.
pub fn digest_opt(&self) -> Option<&str>
pub fn digest_opt(&self) -> Option<&str>
pub fn set_digest<T>(&mut self, field: T)
pub fn set_digest<T>(&mut self, field: T)
Sets digest
with the provided value.
pub fn with_digest<T>(self, field: T) -> Transaction
pub fn with_digest<T>(self, field: T) -> Transaction
Sets digest
with the provided value.
pub fn version_opt_mut(&mut self) -> Option<&mut i32>
pub fn version_opt_mut(&mut self) -> Option<&mut i32>
pub fn version_mut(&mut self) -> &mut i32
pub fn version_mut(&mut self) -> &mut i32
Returns a mutable reference to version
.
If the field is unset, it is first initialized with the default value.
pub fn version_opt(&self) -> Option<i32>
pub fn version_opt(&self) -> Option<i32>
pub fn set_version<T>(&mut self, field: T)
pub fn set_version<T>(&mut self, field: T)
Sets version
with the provided value.
pub fn with_version<T>(self, field: T) -> Transaction
pub fn with_version<T>(self, field: T) -> Transaction
Sets version
with the provided value.
pub fn kind(&self) -> &TransactionKind
pub fn kind(&self) -> &TransactionKind
Returns the value of kind
, or the default value if kind
is unset.
pub fn kind_opt_mut(&mut self) -> Option<&mut TransactionKind>
pub fn kind_opt_mut(&mut self) -> Option<&mut TransactionKind>
pub fn kind_mut(&mut self) -> &mut TransactionKind
pub fn kind_mut(&mut self) -> &mut TransactionKind
Returns a mutable reference to kind
.
If the field is unset, it is first initialized with the default value.
pub fn kind_opt(&self) -> Option<&TransactionKind>
pub fn kind_opt(&self) -> Option<&TransactionKind>
pub fn set_kind<T>(&mut self, field: T)where
T: Into<TransactionKind>,
pub fn set_kind<T>(&mut self, field: T)where
T: Into<TransactionKind>,
Sets kind
with the provided value.
pub fn with_kind<T>(self, field: T) -> Transactionwhere
T: Into<TransactionKind>,
pub fn with_kind<T>(self, field: T) -> Transactionwhere
T: Into<TransactionKind>,
Sets kind
with the provided value.
pub fn sender_opt_mut(&mut self) -> Option<&mut String>
pub fn sender_opt_mut(&mut self) -> Option<&mut String>
pub fn sender_mut(&mut self) -> &mut String
pub fn sender_mut(&mut self) -> &mut String
Returns a mutable reference to sender
.
If the field is unset, it is first initialized with the default value.
pub fn sender_opt(&self) -> Option<&str>
pub fn sender_opt(&self) -> Option<&str>
pub fn set_sender<T>(&mut self, field: T)
pub fn set_sender<T>(&mut self, field: T)
Sets sender
with the provided value.
pub fn with_sender<T>(self, field: T) -> Transaction
pub fn with_sender<T>(self, field: T) -> Transaction
Sets sender
with the provided value.
pub fn gas_payment(&self) -> &GasPayment
pub fn gas_payment(&self) -> &GasPayment
Returns the value of gas_payment
, or the default value if gas_payment
is unset.
pub fn gas_payment_opt_mut(&mut self) -> Option<&mut GasPayment>
pub fn gas_payment_opt_mut(&mut self) -> Option<&mut GasPayment>
pub fn gas_payment_mut(&mut self) -> &mut GasPayment
pub fn gas_payment_mut(&mut self) -> &mut GasPayment
Returns a mutable reference to gas_payment
.
If the field is unset, it is first initialized with the default value.
pub fn gas_payment_opt(&self) -> Option<&GasPayment>
pub fn gas_payment_opt(&self) -> Option<&GasPayment>
pub fn set_gas_payment<T>(&mut self, field: T)where
T: Into<GasPayment>,
pub fn set_gas_payment<T>(&mut self, field: T)where
T: Into<GasPayment>,
Sets gas_payment
with the provided value.
pub fn with_gas_payment<T>(self, field: T) -> Transactionwhere
T: Into<GasPayment>,
pub fn with_gas_payment<T>(self, field: T) -> Transactionwhere
T: Into<GasPayment>,
Sets gas_payment
with the provided value.
pub fn expiration(&self) -> &TransactionExpiration
pub fn expiration(&self) -> &TransactionExpiration
Returns the value of expiration
, or the default value if expiration
is unset.
pub fn expiration_opt_mut(&mut self) -> Option<&mut TransactionExpiration>
pub fn expiration_opt_mut(&mut self) -> Option<&mut TransactionExpiration>
pub fn expiration_mut(&mut self) -> &mut TransactionExpiration
pub fn expiration_mut(&mut self) -> &mut TransactionExpiration
Returns a mutable reference to expiration
.
If the field is unset, it is first initialized with the default value.
pub fn expiration_opt(&self) -> Option<&TransactionExpiration>
pub fn expiration_opt(&self) -> Option<&TransactionExpiration>
pub fn set_expiration<T>(&mut self, field: T)where
T: Into<TransactionExpiration>,
pub fn set_expiration<T>(&mut self, field: T)where
T: Into<TransactionExpiration>,
Sets expiration
with the provided value.
pub fn with_expiration<T>(self, field: T) -> Transactionwhere
T: Into<TransactionExpiration>,
pub fn with_expiration<T>(self, field: T) -> Transactionwhere
T: Into<TransactionExpiration>,
Sets expiration
with the provided value.
Trait Implementations§
§impl Clone for Transaction
impl Clone for Transaction
§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for Transaction
impl Debug for Transaction
§impl Default for Transaction
impl Default for Transaction
§fn default() -> Transaction
fn default() -> Transaction
§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
§fn deserialize<D>(
deserializer: D,
) -> Result<Transaction, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Transaction, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl From<Transaction> for Transaction
impl From<Transaction> for Transaction
§fn from(value: Transaction) -> Transaction
fn from(value: Transaction) -> Transaction
§impl From<TransactionData> for Transaction
impl From<TransactionData> for Transaction
§fn from(value: TransactionData) -> Transaction
fn from(value: TransactionData) -> Transaction
§impl Merge<&Transaction> for Transaction
impl Merge<&Transaction> for Transaction
fn merge(&mut self, source: &Transaction, mask: &FieldMaskTree)
fn merge_from(source: T, mask: &FieldMaskTree) -> Selfwhere
Self: Default,
§impl Merge<Transaction> for Transaction
impl Merge<Transaction> for Transaction
fn merge(&mut self, source: Transaction, mask: &FieldMaskTree)
fn merge_from(source: T, mask: &FieldMaskTree) -> Selfwhere
Self: Default,
§impl Merge<TransactionData> for Transaction
impl Merge<TransactionData> for Transaction
fn merge(&mut self, source: TransactionData, mask: &FieldMaskTree)
fn merge_from(source: T, mask: &FieldMaskTree) -> Selfwhere
Self: Default,
§impl Message for Transaction
impl Message for Transaction
§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.§impl MessageFields for Transaction
impl MessageFields for Transaction
§impl PartialEq for Transaction
impl PartialEq for Transaction
§impl Serialize for Transaction
impl Serialize for Transaction
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
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§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read more§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a Request
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered
].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.