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