pub struct Via {
pub path: Path,
}Expand description
A multi-step relation path.
A HasMany or HasOne declared with #[has_many(via = a.b)] reaches its
target by following a path of existing relations rather than pairing with a
single BelongsTo. The path is resolved at macro-expansion time — the
derive emits a chained call on the model’s Fields struct
(e.g. User::fields().comments().article()) and converts it into a
stmt::Path, so a misspelled or otherwise unresolvable segment is a
Rust compile error rather than a runtime schema validation failure.
Fields§
§path: PathThe resolved field path, rooted at the model that declares the via relation.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Via
impl RefUnwindSafe for Via
impl Send for Via
impl Sync for Via
impl Unpin for Via
impl UnsafeUnpin for Via
impl UnwindSafe for Via
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