Struct scale_info::build::FieldBuilder
source · [−]pub struct FieldBuilder<N = NameNotAssigned, T = TypeNotAssigned> { /* private fields */ }
Expand description
Construct a valid Field
.
Implementations
sourceimpl FieldBuilder
impl FieldBuilder
sourceimpl<T> FieldBuilder<NameNotAssigned, T>
impl<T> FieldBuilder<NameNotAssigned, T>
sourcepub fn name(self, name: &'static str) -> FieldBuilder<NameAssigned, T>
pub fn name(self, name: &'static str) -> FieldBuilder<NameAssigned, T>
Initialize the field name.
sourceimpl<N> FieldBuilder<N, TypeNotAssigned>
impl<N> FieldBuilder<N, TypeNotAssigned>
sourcepub fn ty<TY>(self) -> FieldBuilder<N, TypeAssigned>where
TY: TypeInfo + 'static + ?Sized,
pub fn ty<TY>(self) -> FieldBuilder<N, TypeAssigned>where
TY: TypeInfo + 'static + ?Sized,
Initialize the type of the field.
sourcepub fn compact<TY>(self) -> FieldBuilder<N, TypeAssigned>where
TY: HasCompact + TypeInfo + 'static,
pub fn compact<TY>(self) -> FieldBuilder<N, TypeAssigned>where
TY: HasCompact + TypeInfo + 'static,
Initializes the type of the field as a compact type.
sourceimpl<N, T> FieldBuilder<N, T>
impl<N, T> FieldBuilder<N, T>
sourcepub fn type_name(self, type_name: &'static str) -> FieldBuilder<N, T>
pub fn type_name(self, type_name: &'static str) -> FieldBuilder<N, T>
Initialize the type name of a field (optional).
sourcepub fn docs(self, _docs: &'static [&'static str]) -> FieldBuilder<N, T>
pub fn docs(self, _docs: &'static [&'static str]) -> FieldBuilder<N, T>
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.
sourceimpl<N> FieldBuilder<N, TypeAssigned>
impl<N> FieldBuilder<N, TypeAssigned>
Trait Implementations
Auto Trait Implementations
impl<N, T> RefUnwindSafe for FieldBuilder<N, T>
impl<N, T> Send for FieldBuilder<N, T>
impl<N, T> Sync for FieldBuilder<N, T>
impl<N, T> Unpin for FieldBuilder<N, T>
impl<N, T> UnwindSafe for FieldBuilder<N, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more