[][src]Struct scale_info::TypeDefComposite

pub struct TypeDefComposite<F: Form = MetaForm> { /* fields omitted */ }

A composite type, consisting of either named (struct) or unnamed (tuple struct) fields

Examples

A Rust struct with named fields.

struct Person {
    name: String,
    age_in_years: u8,
    friends: Vec<Person>,
}

A tuple struct with unnamed fields.

struct Color(u8, u8, u8);

A so-called unit struct

struct JustAMarker;

Implementations

impl TypeDefComposite[src]

pub fn new<I>(fields: I) -> Self where
    I: IntoIterator<Item = Field>, 
[src]

Creates a new struct definition with named fields.

Trait Implementations

impl<F: Clone + Form> Clone for TypeDefComposite<F>[src]

impl<F: Debug + Form> Debug for TypeDefComposite<F>[src]

impl<F: Eq + Form> Eq for TypeDefComposite<F>[src]

impl<F: Form> From<TypeDefComposite<F>> for TypeDef<F>[src]

impl<F: Form> From<Vec<Field<F>>> for TypeDefComposite<F>[src]

impl IntoCompact for TypeDefComposite[src]

type Output = TypeDefComposite<CompactForm>

The compact version of Self.

impl<F: Ord + Form> Ord for TypeDefComposite<F>[src]

impl<F: PartialEq + Form> PartialEq<TypeDefComposite<F>> for TypeDefComposite<F>[src]

impl<F: PartialOrd + Form> PartialOrd<TypeDefComposite<F>> for TypeDefComposite<F>[src]

impl<F: Form> Serialize for TypeDefComposite<F> where
    F::TypeId: Serialize
[src]

impl<F: Form> StructuralEq for TypeDefComposite<F>[src]

impl<F: Form> StructuralPartialEq for TypeDefComposite<F>[src]

Auto Trait Implementations

impl<F> RefUnwindSafe for TypeDefComposite<F> where
    <F as Form>::String: RefUnwindSafe,
    <F as Form>::TypeId: RefUnwindSafe

impl<F> Send for TypeDefComposite<F> where
    <F as Form>::String: Send,
    <F as Form>::TypeId: Send

impl<F> Sync for TypeDefComposite<F> where
    <F as Form>::String: Sync,
    <F as Form>::TypeId: Sync

impl<F> Unpin for TypeDefComposite<F> where
    <F as Form>::String: Unpin,
    <F as Form>::TypeId: Unpin

impl<F> UnwindSafe for TypeDefComposite<F> where
    <F as Form>::String: UnwindSafe,
    <F as Form>::TypeId: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.