#[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§
Source§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
Source§impl Transaction
impl Transaction
pub fn path_builder() -> TransactionFieldPathBuilder
Source§impl Transaction
impl Transaction
pub const fn const_default() -> Self
Sourcepub fn bcs_opt_mut(&mut self) -> Option<&mut Bcs>
pub fn bcs_opt_mut(&mut self) -> Option<&mut Bcs>
Sourcepub 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.
Sourcepub fn digest_opt_mut(&mut self) -> Option<&mut String>
pub fn digest_opt_mut(&mut self) -> Option<&mut String>
Sourcepub 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.
Sourcepub fn digest_opt(&self) -> Option<&str>
pub fn digest_opt(&self) -> Option<&str>
Sourcepub fn set_digest<T: Into<String>>(&mut self, field: T)
pub fn set_digest<T: Into<String>>(&mut self, field: T)
Sets digest
with the provided value.
Sourcepub fn with_digest<T: Into<String>>(self, field: T) -> Self
pub fn with_digest<T: Into<String>>(self, field: T) -> Self
Sets digest
with the provided value.
Sourcepub fn version_opt_mut(&mut self) -> Option<&mut i32>
pub fn version_opt_mut(&mut self) -> Option<&mut i32>
Sourcepub 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.
Sourcepub fn version_opt(&self) -> Option<i32>
pub fn version_opt(&self) -> Option<i32>
Sourcepub fn set_version<T: Into<i32>>(&mut self, field: T)
pub fn set_version<T: Into<i32>>(&mut self, field: T)
Sets version
with the provided value.
Sourcepub fn with_version<T: Into<i32>>(self, field: T) -> Self
pub fn with_version<T: Into<i32>>(self, field: T) -> Self
Sets version
with the provided value.
Sourcepub fn kind(&self) -> &TransactionKind
pub fn kind(&self) -> &TransactionKind
Returns the value of kind
, or the default value if kind
is unset.
Sourcepub fn kind_opt_mut(&mut self) -> Option<&mut TransactionKind>
pub fn kind_opt_mut(&mut self) -> Option<&mut TransactionKind>
Sourcepub 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.
Sourcepub fn kind_opt(&self) -> Option<&TransactionKind>
pub fn kind_opt(&self) -> Option<&TransactionKind>
Sourcepub fn set_kind<T: Into<TransactionKind>>(&mut self, field: T)
pub fn set_kind<T: Into<TransactionKind>>(&mut self, field: T)
Sets kind
with the provided value.
Sourcepub fn with_kind<T: Into<TransactionKind>>(self, field: T) -> Self
pub fn with_kind<T: Into<TransactionKind>>(self, field: T) -> Self
Sets kind
with the provided value.
Sourcepub fn sender_opt_mut(&mut self) -> Option<&mut String>
pub fn sender_opt_mut(&mut self) -> Option<&mut String>
Sourcepub 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.
Sourcepub fn sender_opt(&self) -> Option<&str>
pub fn sender_opt(&self) -> Option<&str>
Sourcepub fn set_sender<T: Into<String>>(&mut self, field: T)
pub fn set_sender<T: Into<String>>(&mut self, field: T)
Sets sender
with the provided value.
Sourcepub fn with_sender<T: Into<String>>(self, field: T) -> Self
pub fn with_sender<T: Into<String>>(self, field: T) -> Self
Sets sender
with the provided value.
Sourcepub 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.
Sourcepub fn gas_payment_opt_mut(&mut self) -> Option<&mut GasPayment>
pub fn gas_payment_opt_mut(&mut self) -> Option<&mut GasPayment>
Sourcepub 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.
Sourcepub fn gas_payment_opt(&self) -> Option<&GasPayment>
pub fn gas_payment_opt(&self) -> Option<&GasPayment>
Sourcepub fn set_gas_payment<T: Into<GasPayment>>(&mut self, field: T)
pub fn set_gas_payment<T: Into<GasPayment>>(&mut self, field: T)
Sets gas_payment
with the provided value.
Sourcepub fn with_gas_payment<T: Into<GasPayment>>(self, field: T) -> Self
pub fn with_gas_payment<T: Into<GasPayment>>(self, field: T) -> Self
Sets gas_payment
with the provided value.
Sourcepub fn expiration(&self) -> &TransactionExpiration
pub fn expiration(&self) -> &TransactionExpiration
Returns the value of expiration
, or the default value if expiration
is unset.
Sourcepub fn expiration_opt_mut(&mut self) -> Option<&mut TransactionExpiration>
pub fn expiration_opt_mut(&mut self) -> Option<&mut TransactionExpiration>
Sourcepub 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.
Sourcepub fn expiration_opt(&self) -> Option<&TransactionExpiration>
pub fn expiration_opt(&self) -> Option<&TransactionExpiration>
Sourcepub fn set_expiration<T: Into<TransactionExpiration>>(&mut self, field: T)
pub fn set_expiration<T: Into<TransactionExpiration>>(&mut self, field: T)
Sets expiration
with the provided value.
Sourcepub fn with_expiration<T: Into<TransactionExpiration>>(self, field: T) -> Self
pub fn with_expiration<T: Into<TransactionExpiration>>(self, field: T) -> Self
Sets expiration
with the provided value.
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§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 moreSource§impl Debug for Transaction
impl Debug for Transaction
Source§impl Default for Transaction
impl Default for Transaction
§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
§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>,
Source§impl From<Transaction> for Transaction
impl From<Transaction> for Transaction
Source§fn from(value: Transaction) -> Self
fn from(value: Transaction) -> Self
Source§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,
Source§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,
Source§impl Message for Transaction
impl Message for Transaction
Source§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
.Source§impl MessageFields for Transaction
impl MessageFields for Transaction
const FIELDS: &'static [&'static MessageField]
Source§impl PartialEq for Transaction
impl PartialEq for Transaction
§impl Serialize for Transaction
impl Serialize for Transaction
Source§impl TryFrom<&Transaction> for Transaction
impl TryFrom<&Transaction> for Transaction
Source§type Error = TryFromProtoError
type Error = TryFromProtoError
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<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 moreSource§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> 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>
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>
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>
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§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,
§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.