pub enum EncodableField<'a> {
    Primitive(EncodablePrimitive<'a>),
    Struct(Vec<EncodableField<'a>>),
}

Variants§

§

Primitive(EncodablePrimitive<'a>)

§

Struct(Vec<EncodableField<'a>>)

Implementations§

source§

impl<'a> EncodableField<'a>

source

pub fn encode(&self, dst: &mut [u8], offset: usize) -> Result<usize, Error>

Trait Implementations§

source§

impl<'a> Debug for EncodableField<'a>

source§

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

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

impl<'a> From<Seq0255<'a, Inner<'a, false, 1, 1, 255>>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, B0255<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, Inner<'a, false, 1, 2, { u16::MAX as usize }>>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, B064K<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, Inner<'a, false, 1, 3, { 2_usize.pow(24) - 1 }>>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, B016M<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, Inner<'a, true, 32, 0, 0>>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, U256<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, Inner<'a, true, 6, 0, 0>>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, ShortTxId<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, Inner<'a, true, 64, 0, 0>>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, Signature<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, U24>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, U24>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, bool>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, bool>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, u16>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, u16>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, u32>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, u32>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, u64>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, u64>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq0255<'a, u8>> for EncodableField<'a>

source§

fn from(v: Seq0255<'_, u8>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, Inner<'a, false, 1, 1, 255>>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, B0255<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, Inner<'a, false, 1, 2, { u16::MAX as usize }>>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, B064K<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, Inner<'a, false, 1, 3, { 2_usize.pow(24) - 1 }>>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, B016M<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, Inner<'a, true, 32, 0, 0>>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, U256<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, Inner<'a, true, 6, 0, 0>>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, ShortTxId<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, Inner<'a, true, 64, 0, 0>>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, Signature<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, U24>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, U24>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, bool>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, bool>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, u16>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, u16>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, u32>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, u32>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, u64>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, u64>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Seq064K<'a, u8>> for EncodableField<'a>

source§

fn from(v: Seq064K<'a, u8>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, Inner<'a, false, 1, 1, 255>>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, B0255<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, Inner<'a, false, 1, 2, { u16::MAX as usize }>>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, B064K<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, Inner<'a, false, 1, 3, { 2_usize.pow(24) - 1 }>>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, B016M<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, Inner<'a, true, 32, 0, 0>>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, U256<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, Inner<'a, true, 6, 0, 0>>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, ShortTxId<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, Inner<'a, true, 64, 0, 0>>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, Signature<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, U24>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, U24>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, bool>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, bool>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, u16>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, u16>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, u32>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, u32>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, u64>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, u64>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Sv2Option<'a, u8>> for EncodableField<'a>

source§

fn from(v: Sv2Option<'_, u8>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<U24> for EncodableField<'a>

source§

fn from(v: U24) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Vec<u8>> for EncodableField<'a>

source§

fn from(_v: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<bool> for EncodableField<'a>

source§

fn from(v: bool) -> Self

Converts to this type from the input type.
source§

impl<'a> From<f32> for EncodableField<'a>

source§

fn from(v: f32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u16> for EncodableField<'a>

source§

fn from(v: u16) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u32> for EncodableField<'a>

source§

fn from(v: u32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u64> for EncodableField<'a>

source§

fn from(v: u64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<u8> for EncodableField<'a>

source§

fn from(v: u8) -> Self

Converts to this type from the input type.
source§

impl<'a> GetSize for EncodableField<'a>

source§

fn get_size(&self) -> usize

source§

impl<'a> TryFrom<EncodableField<'a>> for B0255<'a>

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for B032<'a>

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for B064K<'a>

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for B016M<'a>

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for U256<'a>

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for U32AsRef<'a>

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for ShortTxId<'a>

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for Signature<'a>

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for U24

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for bool

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for f32

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for u16

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for u32

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for u64

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<EncodableField<'a>> for u8

§

type Error = Error

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

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<'a> Freeze for EncodableField<'a>

§

impl<'a> RefUnwindSafe for EncodableField<'a>

§

impl<'a> Send for EncodableField<'a>

§

impl<'a> Sync for EncodableField<'a>

§

impl<'a> Unpin for EncodableField<'a>

§

impl<'a> !UnwindSafe for EncodableField<'a>

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
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<'a, T> Encodable for T
where T: Into<EncodableField<'a>>,

source§

fn to_bytes(self, dst: &mut [u8]) -> Result<usize, Error>

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, 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.