[][src]Struct scale_info::build::FieldsBuilder

pub struct FieldsBuilder<T> { /* fields omitted */ }

Build a set of either all named (e.g. for a struct) or all unnamed (e.g. for a tuple struct)

Implementations

impl<T> FieldsBuilder<T>[src]

pub fn done(self) -> Vec<Field<MetaForm>>

Notable traits for Vec<u8>

impl Write for Vec<u8>
[src]

Complete building and return the set of fields

impl FieldsBuilder<NamedFields>[src]

pub fn field(self, name: &'static str, ty: MetaType) -> Self[src]

Add a named field with the given MetaType instance

pub fn field_of<T: ?Sized>(self, name: &'static str) -> Self where
    T: TypeInfo + 'static, 
[src]

Add a named field with the type of the type parameter T

impl FieldsBuilder<UnnamedFields>[src]

pub fn field(self, ty: MetaType) -> Self[src]

Add an unnamed field with the given MetaType instance

pub fn field_of<T: ?Sized>(self) -> Self where
    T: TypeInfo + 'static, 
[src]

Add an unnamed field with the type of the type parameter T

Trait Implementations

impl<T> Default for FieldsBuilder<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for FieldsBuilder<T>

impl<T> Send for FieldsBuilder<T>

impl<T> Sync for FieldsBuilder<T>

impl<T> Unpin for FieldsBuilder<T>

impl<T> UnwindSafe for FieldsBuilder<T>

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