[][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 finalize(self) -> Vec<Field<MetaForm>>

Notable traits for Vec<u8, Global>

impl Write for Vec<u8, Global>
[src]

Complete building and return the set of fields

impl FieldsBuilder<NamedFields>[src]

pub fn field_of<T: ?Sized>(
    mut self: Self,
    name: &'static str,
    type_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_of<T: ?Sized>(mut self: Self, type_name: &'static str) -> 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

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.