Struct VersionedTransaction
pub struct VersionedTransaction {
pub signatures: Vec<Signature>,
pub message: VersionedMessage,
}Expand description
An atomic transaction
Fields§
§signatures: Vec<Signature>List of signatures
message: VersionedMessageMessage to sign.
Implementations§
§impl VersionedTransaction
impl VersionedTransaction
pub fn try_new<T>(
message: VersionedMessage,
keypairs: &T,
) -> Result<VersionedTransaction, SignerError>where
T: Signers + ?Sized,
pub fn try_new<T>(
message: VersionedMessage,
keypairs: &T,
) -> Result<VersionedTransaction, SignerError>where
T: Signers + ?Sized,
Signs a versioned message and if successful, returns a signed transaction.
pub fn sanitize(&self) -> Result<(), SanitizeError>
pub fn version(&self) -> TransactionVersion
pub fn version(&self) -> TransactionVersion
Returns the version of the transaction
pub fn into_legacy_transaction(self) -> Option<Transaction>
pub fn into_legacy_transaction(self) -> Option<Transaction>
Returns a legacy transaction if the transaction message is legacy.
pub fn uses_durable_nonce(&self) -> bool
pub fn uses_durable_nonce(&self) -> bool
Returns true if transaction begins with an advance nonce instruction.
Trait Implementations§
§impl Clone for VersionedTransaction
impl Clone for VersionedTransaction
§fn clone(&self) -> VersionedTransaction
fn clone(&self) -> VersionedTransaction
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 more§impl Debug for VersionedTransaction
impl Debug for VersionedTransaction
§impl Default for VersionedTransaction
impl Default for VersionedTransaction
§fn default() -> VersionedTransaction
fn default() -> VersionedTransaction
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for VersionedTransaction
impl<'de> Deserialize<'de> for VersionedTransaction
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VersionedTransaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VersionedTransaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<Transaction> for VersionedTransaction
impl From<Transaction> for VersionedTransaction
§fn from(transaction: Transaction) -> VersionedTransaction
fn from(transaction: Transaction) -> VersionedTransaction
Converts to this type from the input type.
§impl PartialEq for VersionedTransaction
impl PartialEq for VersionedTransaction
§impl SerializableTransaction for VersionedTransaction
impl SerializableTransaction for VersionedTransaction
fn get_signature(&self) -> &Signature
fn get_recent_blockhash(&self) -> &Hash
fn uses_durable_nonce(&self) -> bool
§impl Serialize for VersionedTransaction
impl Serialize for VersionedTransaction
§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,
Serialize this value into the given Serde serializer. Read more
impl Eq for VersionedTransaction
impl StructuralPartialEq for VersionedTransaction
Auto Trait Implementations§
impl Freeze for VersionedTransaction
impl RefUnwindSafe for VersionedTransaction
impl Send for VersionedTransaction
impl Sync for VersionedTransaction
impl Unpin for VersionedTransaction
impl UnwindSafe for VersionedTransaction
Blanket Implementations§
§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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Encode for T
impl<T> Encode for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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>
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