pub struct Transaction<C: Context> { /* private fields */ }
Expand description

A Transaction object that is compatible with the module-system/sov-default-stf.

Implementations§

source§

impl<C: Context> Transaction<C>

source

pub fn signature(&self) -> &C::Signature

source

pub fn pub_key(&self) -> &C::PublicKey

source

pub fn runtime_msg(&self) -> &[u8]

source

pub fn nonce(&self) -> u64

source

pub fn verify(&self) -> Result<()>

Check whether the transaction has been signed correctly.

Trait Implementations§

source§

impl<C: Context> BorshDeserialize for Transaction<C>where C::Signature: BorshDeserialize, C::PublicKey: BorshDeserialize, Vec<u8>: BorshDeserialize, u64: BorshDeserialize,

source§

fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>

source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes.
source§

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
source§

fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where R: Read,

source§

impl<C: Context> BorshSerialize for Transaction<C>where C::Signature: BorshSerialize, C::PublicKey: BorshSerialize, Vec<u8>: BorshSerialize, u64: BorshSerialize,

source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

source§

fn try_to_vec(&self) -> Result<Vec<u8, Global>, Error>

Serialize this instance into a vector of bytes.
source§

impl<C: Clone + Context> Clone for Transaction<C>where C::Signature: Clone, C::PublicKey: Clone,

source§

fn clone(&self) -> Transaction<C>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<C: Debug + Context> Debug for Transaction<C>where C::Signature: Debug, C::PublicKey: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<C: PartialEq + Context> PartialEq<Transaction<C>> for Transaction<C>where C::Signature: PartialEq, C::PublicKey: PartialEq,

source§

fn eq(&self, other: &Transaction<C>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<C: Eq + Context> Eq for Transaction<C>where C::Signature: Eq, C::PublicKey: Eq,

source§

impl<C: Context> StructuralEq for Transaction<C>

source§

impl<C: Context> StructuralPartialEq for Transaction<C>

Auto Trait Implementations§

§

impl<C> RefUnwindSafe for Transaction<C>where <C as Spec>::PublicKey: RefUnwindSafe, <C as Spec>::Signature: RefUnwindSafe,

§

impl<C> Send for Transaction<C>

§

impl<C> Sync for Transaction<C>

§

impl<C> Unpin for Transaction<C>where <C as Spec>::PublicKey: Unpin, <C as Spec>::Signature: Unpin,

§

impl<C> UnwindSafe for Transaction<C>where <C as Spec>::PublicKey: UnwindSafe, <C as Spec>::Signature: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more