pub struct FieldBuilder<F: Form = MetaForm, N = NameNotAssigned, T = TypeNotAssigned> { /* private fields */ }
Expand description
Construct a valid Field
.
Implementations§
Source§impl<F: Form, T> FieldBuilder<F, NameNotAssigned, T>
impl<F: Form, T> FieldBuilder<F, NameNotAssigned, T>
Sourcepub fn name(self, name: F::String) -> FieldBuilder<F, NameAssigned, T>
pub fn name(self, name: F::String) -> FieldBuilder<F, NameAssigned, T>
Initialize the field name.
Source§impl<N> FieldBuilder<MetaForm, N, TypeNotAssigned>
impl<N> FieldBuilder<MetaForm, N, TypeNotAssigned>
Sourcepub fn ty<TY>(self) -> FieldBuilder<MetaForm, N, TypeAssigned>
pub fn ty<TY>(self) -> FieldBuilder<MetaForm, N, TypeAssigned>
Initialize the type of the field.
Sourcepub fn compact<TY>(self) -> FieldBuilder<MetaForm, N, TypeAssigned>where
TY: HasCompact + TypeInfo + 'static,
pub fn compact<TY>(self) -> FieldBuilder<MetaForm, N, TypeAssigned>where
TY: HasCompact + TypeInfo + 'static,
Initializes the type of the field as a compact type.
Source§impl<N> FieldBuilder<PortableForm, N, TypeNotAssigned>
impl<N> FieldBuilder<PortableForm, N, TypeNotAssigned>
Sourcepub fn ty<T>(self, ty: T) -> FieldBuilder<PortableForm, N, TypeAssigned>
pub fn ty<T>(self, ty: T) -> FieldBuilder<PortableForm, N, TypeAssigned>
Initialize the type of the field.
Source§impl<F: Form, N, T> FieldBuilder<F, N, T>
impl<F: Form, N, T> FieldBuilder<F, N, T>
Sourcepub fn type_name(self, type_name: F::String) -> FieldBuilder<F, N, T>
pub fn type_name(self, type_name: F::String) -> FieldBuilder<F, N, T>
Initialize the type name of a field (optional).
Source§impl<N, T> FieldBuilder<MetaForm, N, T>
impl<N, T> FieldBuilder<MetaForm, N, T>
Sourcepub fn docs(self, _docs: &'static [&'static str]) -> Self
pub fn docs(self, _docs: &'static [&'static str]) -> Self
Doc capture is not enabled via the “docs” feature so this is a no-op.
Sourcepub fn docs_always(self, docs: &'static [&'static str]) -> Self
pub fn docs_always(self, docs: &'static [&'static str]) -> Self
Initialize the documentation of a field, always captured even if the “docs” feature is not enabled.
Source§impl<F: Form, N> FieldBuilder<F, N, TypeAssigned>
impl<F: Form, N> FieldBuilder<F, N, TypeAssigned>
Trait Implementations§
Auto Trait Implementations§
impl<F, N, T> Freeze for FieldBuilder<F, N, T>
impl<F, N, T> RefUnwindSafe for FieldBuilder<F, N, T>
impl<F, N, T> Send for FieldBuilder<F, N, T>
impl<F, N, T> Sync for FieldBuilder<F, N, T>
impl<F, N, T> Unpin for FieldBuilder<F, N, T>
impl<F, N, T> UnwindSafe for FieldBuilder<F, N, T>
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