pub trait DecodeAsFields: Sized {
    // Required method
    fn decode_as_fields<'info>(
        input: &mut &[u8],
        fields: &mut dyn FieldIter<'info>,
        types: &'info PortableRegistry
    ) -> Result<Self, Error>;
}
Expand description

This is similar to DecodeAsType, except that it’s instead implemented for types that can be given a list of fields denoting the type being decoded from and attempt to do this decoding. This is generally implemented just for tuple and struct types, and is automatically implemented via the DecodeAsType macro.

Required Methods§

source

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

Given some bytes and some fields denoting their structure, attempt to decode.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl DecodeAsFields for ()

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A> DecodeAsFields for (A,)
where A: IntoVisitor,

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B> DecodeAsFields for (A, B)
where A: IntoVisitor, B: IntoVisitor,

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C> DecodeAsFields for (A, B, C)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D> DecodeAsFields for (A, B, C, D)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E> DecodeAsFields for (A, B, C, D, E)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F> DecodeAsFields for (A, B, C, D, E, F)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G> DecodeAsFields for (A, B, C, D, E, F, G)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H> DecodeAsFields for (A, B, C, D, E, F, G, H)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I> DecodeAsFields for (A, B, C, D, E, F, G, H, I)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K, L)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K, L, M)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> DecodeAsFields for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)

source§

fn decode_as_fields<'info>( input: &mut &[u8], fields: &mut dyn FieldIter<'info>, types: &'info PortableRegistry ) -> Result<Self, Error>

Implementors§