pub struct DecodedMethod<'decoder, 'payload> { /* private fields */ }Expand description
One method of the payload, see TransactionPayloadDecoder::next_method().
Arguments of each kind are in payload order, which is the order in which the method declares
them. So the n-th slot is the n-th #[slot] in the method’s metadata, and the same holds
for inputs and outputs. A method has at most one return value, which is its last output, as
the decoder checks. The state that #[init] returns is an #[output] (often with capacity
0), not a return value, since executors store it instead of writing it.
Implementations§
Source§impl<'decoder, 'payload> DecodedMethod<'decoder, 'payload>
impl<'decoder, 'payload> DecodedMethod<'decoder, 'payload>
Sourcepub fn fingerprint(&self) -> &'payload MethodFingerprint
pub fn fingerprint(&self) -> &'payload MethodFingerprint
Fingerprint of the method to call
Sourcepub fn context(&self) -> TransactionMethodContext
pub fn context(&self) -> TransactionMethodContext
Context to call the method with
Sourcepub fn slots(&self) -> &'decoder [DecodedSlot<'payload>]
pub fn slots(&self) -> &'decoder [DecodedSlot<'payload>]
#[slot] arguments
Sourcepub fn inputs(&self) -> &'decoder [DecodedInput<'payload>]
pub fn inputs(&self) -> &'decoder [DecodedInput<'payload>]
#[input] arguments
Sourcepub fn outputs(&self) -> &'decoder [DecodedOutput]
pub fn outputs(&self) -> &'decoder [DecodedOutput]
#[output] arguments and the return value
Sourcepub fn return_value(&self) -> Option<&'decoder DecodedOutput>
pub fn return_value(&self) -> Option<&'decoder DecodedOutput>
The return value, which is the last output if there is one
Trait Implementations§
Source§impl<'decoder, 'payload> Clone for DecodedMethod<'decoder, 'payload>
impl<'decoder, 'payload> Clone for DecodedMethod<'decoder, 'payload>
Source§fn clone(&self) -> DecodedMethod<'decoder, 'payload>
fn clone(&self) -> DecodedMethod<'decoder, 'payload>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'decoder, 'payload> Copy for DecodedMethod<'decoder, 'payload>
Auto Trait Implementations§
impl<'decoder, 'payload> Freeze for DecodedMethod<'decoder, 'payload>
impl<'decoder, 'payload> RefUnwindSafe for DecodedMethod<'decoder, 'payload>
impl<'decoder, 'payload> Send for DecodedMethod<'decoder, 'payload>
impl<'decoder, 'payload> Sync for DecodedMethod<'decoder, 'payload>
impl<'decoder, 'payload> Unpin for DecodedMethod<'decoder, 'payload>
impl<'decoder, 'payload> UnsafeUnpin for DecodedMethod<'decoder, 'payload>
impl<'decoder, 'payload> UnwindSafe for DecodedMethod<'decoder, 'payload>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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