Struct scale_info::build::FieldsBuilder
source · pub struct FieldsBuilder<F: Form, T> { /* private fields */ }
Expand description
Build a set of either all named (e.g. for a struct) or all unnamed (e.g. for a tuple struct)
Implementations§
source§impl<F: Form, T> FieldsBuilder<F, T>
impl<F: Form, T> FieldsBuilder<F, T>
source§impl FieldsBuilder<MetaForm, NamedFields>
impl FieldsBuilder<MetaForm, NamedFields>
sourcepub fn field<B>(self, builder: B) -> Selfwhere
B: Fn(FieldBuilder) -> FieldBuilder<MetaForm, NameAssigned, TypeAssigned>,
pub fn field<B>(self, builder: B) -> Selfwhere B: Fn(FieldBuilder) -> FieldBuilder<MetaForm, NameAssigned, TypeAssigned>,
Add a named field constructed using the builder.
source§impl FieldsBuilder<MetaForm, UnnamedFields>
impl FieldsBuilder<MetaForm, UnnamedFields>
sourcepub fn field<B>(self, builder: B) -> Selfwhere
B: Fn(FieldBuilder) -> FieldBuilder<MetaForm, NameNotAssigned, TypeAssigned>,
pub fn field<B>(self, builder: B) -> Selfwhere B: Fn(FieldBuilder) -> FieldBuilder<MetaForm, NameNotAssigned, TypeAssigned>,
Add an unnamed field constructed using the builder.
source§impl FieldsBuilder<PortableForm, NamedFields>
impl FieldsBuilder<PortableForm, NamedFields>
sourcepub fn field_portable<B>(self, builder: B) -> Selfwhere
B: Fn(FieldBuilder<PortableForm, NameNotAssigned, TypeNotAssigned>) -> FieldBuilder<PortableForm, NameAssigned, TypeAssigned>,
pub fn field_portable<B>(self, builder: B) -> Selfwhere B: Fn(FieldBuilder<PortableForm, NameNotAssigned, TypeNotAssigned>) -> FieldBuilder<PortableForm, NameAssigned, TypeAssigned>,
Add a named field constructed using the builder.
source§impl FieldsBuilder<PortableForm, UnnamedFields>
impl FieldsBuilder<PortableForm, UnnamedFields>
sourcepub fn field_portable<B>(self, builder: B) -> Selfwhere
B: Fn(FieldBuilder<PortableForm, NameNotAssigned, TypeNotAssigned>) -> FieldBuilder<PortableForm, NameNotAssigned, TypeAssigned>,
pub fn field_portable<B>(self, builder: B) -> Selfwhere B: Fn(FieldBuilder<PortableForm, NameNotAssigned, TypeNotAssigned>) -> FieldBuilder<PortableForm, NameNotAssigned, TypeAssigned>,
Add an unnamed field constructed using the builder.
Trait Implementations§
Auto Trait Implementations§
impl<F, T> RefUnwindSafe for FieldsBuilder<F, T>where <F as Form>::String: RefUnwindSafe, <F as Form>::Type: RefUnwindSafe,
impl<F, T> Send for FieldsBuilder<F, T>where <F as Form>::String: Send, <F as Form>::Type: Send,
impl<F, T> Sync for FieldsBuilder<F, T>where <F as Form>::String: Sync, <F as Form>::Type: Sync,
impl<F, T> Unpin for FieldsBuilder<F, T>where <F as Form>::String: Unpin, <F as Form>::Type: Unpin,
impl<F, T> UnwindSafe for FieldsBuilder<F, T>where <F as Form>::String: UnwindSafe, <F as Form>::Type: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more