pub struct FixedEnumVariant<const DISCRIMINATOR: u8, T> {
    pub fields: T,
}

Fields§

§fields: T

Implementations§

source§

impl<const DISCRIMINATOR: u8, T> FixedEnumVariant<DISCRIMINATOR, T>

source

pub fn new(fields: T) -> FixedEnumVariant<DISCRIMINATOR, T>

source

pub fn for_encoding(fields: &T) -> FixedEnumVariant<DISCRIMINATOR, &T>

Trait Implementations§

source§

impl<X, const DISCRIMINATOR: u8, T> Categorize<X> for FixedEnumVariant<DISCRIMINATOR, T>
where X: CustomValueKind, T: SborTuple<X>,

source§

impl<X, D, const DISCRIMINATOR: u8, T> Decode<X, D> for FixedEnumVariant<DISCRIMINATOR, T>
where X: CustomValueKind, D: Decoder<X>, T: Decode<X, D> + SborTuple<X>,

source§

fn decode_body_with_value_kind( decoder: &mut D, value_kind: ValueKind<X> ) -> Result<FixedEnumVariant<DISCRIMINATOR, T>, DecodeError>

Decodes the type from the decoder, which should match a preloaded value kind. Read more
source§

impl<X, E, const DISCRIMINATOR: u8, T> Encode<X, E> for FixedEnumVariant<DISCRIMINATOR, T>
where X: CustomValueKind, E: Encoder<X>, T: Encode<X, E> + SborTuple<X>,

source§

fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR value’s kind to the encoder
source§

fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>

Encodes the SBOR body of the type to the encoder. Read more
source§

impl<X, const DISCRIMINATOR: u8, T> IsFixedEnumVariant<X, T> for FixedEnumVariant<DISCRIMINATOR, T>
where X: CustomValueKind, T: SborTuple<X> + for<'a> Encode<X, VecEncoder<'a, X>>,

source§

const DISCRIMINATOR: u8 = DISCRIMINATOR

§

type EncodingFixedEnumVariant<'a> = FixedEnumVariant<DISCRIMINATOR, &'a T> where T: 'a

source§

fn new(fields: T) -> FixedEnumVariant<DISCRIMINATOR, T>

source§

fn for_encoding<'a>( fields: &'a T ) -> <FixedEnumVariant<DISCRIMINATOR, T> as IsFixedEnumVariant<X, T>>::EncodingFixedEnumVariant<'a>

source§

fn into_fields(self) -> T

source§

impl<X, const DISCRIMINATOR: u8, T> SborEnum<X> for FixedEnumVariant<DISCRIMINATOR, T>
where X: CustomValueKind, T: SborTuple<X>,

Auto Trait Implementations§

§

impl<const DISCRIMINATOR: u8, T> RefUnwindSafe for FixedEnumVariant<DISCRIMINATOR, T>
where T: RefUnwindSafe,

§

impl<const DISCRIMINATOR: u8, T> Send for FixedEnumVariant<DISCRIMINATOR, T>
where T: Send,

§

impl<const DISCRIMINATOR: u8, T> Sync for FixedEnumVariant<DISCRIMINATOR, T>
where T: Sync,

§

impl<const DISCRIMINATOR: u8, T> Unpin for FixedEnumVariant<DISCRIMINATOR, T>
where T: Unpin,

§

impl<const DISCRIMINATOR: u8, T> UnwindSafe for FixedEnumVariant<DISCRIMINATOR, T>
where T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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, U> Into<U> for T
where 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 for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> BasicCategorize for T

source§

impl<T> BasicDecode for T

source§

impl<T> BasicEncode for T

source§

impl<T> BasicSborEnum for T

source§

impl<T> ManifestCategorize for T

source§

impl<T> ManifestDecode for T

source§

impl<T> ManifestEncode for T

source§

impl<T> ManifestSborEnum for T

source§

impl<T> ScryptoCategorize for T

source§

impl<T> ScryptoDecode for T

source§

impl<T> ScryptoEncode for T

source§

impl<T> ScryptoSborEnum for T