pub struct Field<'a> {
pub id: Ident<'a>,
pub ty: Type<'a>,
pub default_value: Option<DefaultValue<'a>>,
pub metadata: Option<Metadata<'a>>,
pub doc: Comment<'a>,
}Expand description
A field of a Struct or Table.
Fields§
§id: Ident<'a>§ty: Type<'a>§default_value: Option<DefaultValue<'a>>§metadata: Option<Metadata<'a>>§doc: Comment<'a>Implementations§
Source§impl<'a> Field<'a>
impl<'a> Field<'a>
Sourcepub fn builder() -> FieldBuilder<'a, ((), (), (), (), ())>
pub fn builder() -> FieldBuilder<'a, ((), (), (), (), ())>
Create a builder for building Field.
On the builder, call .id(...), .ty(...), .default_value(...)(optional), .metadata(...)(optional), .doc(...)(optional) to set the values of the fields (they accept Into values).
Finally, call .build() to create the instance of Field.
Trait Implementations§
impl<'a> StructuralPartialEq for Field<'a>
Auto Trait Implementations§
impl<'a> Freeze for Field<'a>
impl<'a> RefUnwindSafe for Field<'a>
impl<'a> Send for Field<'a>
impl<'a> Sync for Field<'a>
impl<'a> Unpin for Field<'a>
impl<'a> UnwindSafe for Field<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more