Skip to main content

NavigationMeta

Struct NavigationMeta 

Source
pub struct NavigationMeta {
Show 19 fields pub field_name: Cow<'static, str>, pub kind: NavigationKind, pub related_type_id: TypeId, pub related_type_name: Cow<'static, str>, pub foreign_key_field: Option<Cow<'static, str>>, pub inverse_navigation: Option<Cow<'static, str>>, pub through_type_id: Option<TypeId>, pub through_table: Option<Cow<'static, str>>, pub through_parent_fk: Option<Cow<'static, str>>, pub through_related_fk: Option<Cow<'static, str>>, pub through_parent_fk_index: usize, pub through_related_fk_index: usize, pub related_table: Option<Cow<'static, str>>, pub fk_column: Option<Cow<'static, str>>, pub referenced_key_column: Option<Cow<'static, str>>, pub fk_row_index: usize, pub pk_row_index: usize, pub related_entity_meta: Option<fn() -> EntityTypeMeta>, pub delete_behavior: Option<DeleteBehavior>,
}
Expand description

Metadata describing a navigation property (relationship). Corresponds to EFCore’s INavigation.

Fields§

§field_name: Cow<'static, str>

The Rust field name of this navigation property.

§kind: NavigationKind

The kind of navigation (BelongsTo, HasOne, HasMany).

§related_type_id: TypeId

The related entity’s TypeId.

§related_type_name: Cow<'static, str>

The related entity’s type name.

§foreign_key_field: Option<Cow<'static, str>>

The foreign key property name on the dependent entity.

§inverse_navigation: Option<Cow<'static, str>>

The inverse navigation field name on the related entity.

§through_type_id: Option<TypeId>

For many-to-many: the join entity TypeId.

§through_table: Option<Cow<'static, str>>

Join table name (many-to-many).

§through_parent_fk: Option<Cow<'static, str>>

FK column on the join table pointing to the principal entity.

§through_related_fk: Option<Cow<'static, str>>

FK column on the join table pointing to the related entity.

§through_parent_fk_index: usize

Column index in join-table rows for the principal FK.

§through_related_fk_index: usize

Column index in join-table rows for the related FK.

§related_table: Option<Cow<'static, str>>

Related entity table name (for eager loading).

§fk_column: Option<Cow<'static, str>>

Foreign key column on the dependent/related table.

§referenced_key_column: Option<Cow<'static, str>>

Referenced key column on the principal table.

§fk_row_index: usize

Column index in SELECT * rows for the FK (HasMany grouping).

§pk_row_index: usize

Column index in SELECT * rows for the related PK (BelongsTo lookup).

§related_entity_meta: Option<fn() -> EntityTypeMeta>

Resolves metadata for the related entity type (nested Include / ThenInclude).

§delete_behavior: Option<DeleteBehavior>

Delete behavior for this navigation. None means use the default (Cascade for required FKs and M2M, Restrict for optional FKs). Set via #[on_delete(Cascade|Restrict|SetNull|NoAction)].

Trait Implementations§

Source§

impl Clone for NavigationMeta

Source§

fn clone(&self) -> NavigationMeta

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NavigationMeta

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.