pub struct FieldMeta {
pub name: String,
pub kind: FieldKind,
pub nullable: bool,
}Expand description
Minimal description of a column, as the admin already knows it from the schema. Inference works purely off this.
Build one from the framework’s own field metadata with
FieldMeta::from_admin_field; the raw constructor exists for tests and
callers that already have name/kind/nullability in hand.
Fields§
§name: StringColumn name.
kind: FieldKindCoarse type bucket used by the inference rules.
nullable: boolWhether the column is nullable.
Implementations§
Source§impl FieldMeta
impl FieldMeta
Sourcepub fn from_admin_field(field: &AdminField) -> Self
pub fn from_admin_field(field: &AdminField) -> Self
Bridge the framework’s AdminField into the inference vocabulary.
The admin’s FieldType has no ForeignKey/Enum/Json variants —
those live on AdminField as relation and choices — so they are
derived here. Anything textual (String/Email/Phone/FilePath/
their Optional* forms) collapses to FieldKind::Text.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldMeta
impl RefUnwindSafe for FieldMeta
impl Send for FieldMeta
impl Sync for FieldMeta
impl Unpin for FieldMeta
impl UnsafeUnpin for FieldMeta
impl UnwindSafe for FieldMeta
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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