Struct hedera::TransactionId
source · pub struct TransactionId {
pub account_id: AccountId,
pub valid_start: OffsetDateTime,
pub nonce: Option<i32>,
pub scheduled: bool,
}
Expand description
The client-generated ID for a transaction.
This is used for retrieving receipts and records for a transaction, for appending to a file right after creating it, for instantiating a smart contract with bytecode in a file just created, and internally by the network for detecting when duplicate transactions are submitted.
Fields§
§account_id: AccountId
The account that pays for this transaction.
valid_start: OffsetDateTime
The time from when this transaction is valid.
When a transaction is submitted there is additionally a
valid_duration
(defaults to 120s)
and together they define a time window that a transaction may be processed in.
nonce: Option<i32>
Nonce for this transaction.
scheduled: bool
true
if the transaction is scheduled
.
Implementations§
source§impl TransactionId
impl TransactionId
sourcepub fn generate(account_id: AccountId) -> Self
pub fn generate(account_id: AccountId) -> Self
Generates a new transaction ID for the given account ID.
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Create a new TransactionId
from protobuf-encoded bytes
.
§Errors
Error::FromProtobuf
if decoding the bytes fails to produce a valid protobuf.Error::FromProtobuf
if decoding the protobuf fails.
Trait Implementations§
source§impl Clone for TransactionId
impl Clone for TransactionId
source§fn clone(&self) -> TransactionId
fn clone(&self) -> TransactionId
Returns a copy 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 TransactionId
impl Debug for TransactionId
source§impl Display for TransactionId
impl Display for TransactionId
source§impl FromStr for TransactionId
impl FromStr for TransactionId
source§impl Hash for TransactionId
impl Hash for TransactionId
source§impl PartialEq for TransactionId
impl PartialEq for TransactionId
source§fn eq(&self, other: &TransactionId) -> bool
fn eq(&self, other: &TransactionId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TransactionId
impl Eq for TransactionId
impl StructuralPartialEq for TransactionId
Auto Trait Implementations§
impl Freeze for TransactionId
impl RefUnwindSafe for TransactionId
impl Send for TransactionId
impl Sync for TransactionId
impl Unpin for TransactionId
impl UnwindSafe for TransactionId
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request