Skip to main content

GetRefExt

Trait GetRefExt 

Source
pub trait GetRefExt<T: TableSource, E> {
    // Required method
    fn get_ref<E2: Entity<T::Value> + 'static>(
        &self,
        relation: &str,
    ) -> Result<Table<T, E2>>;
}
Expand description

Traverse a relation from a loaded record.

Required Methods§

Source

fn get_ref<E2: Entity<T::Value> + 'static>( &self, relation: &str, ) -> Result<Table<T, E2>>

Return the related set for relation, reading the join value out of the in-memory entity. Errors if the relation is unknown to the table.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T, E> GetRefExt<T, E> for ActiveEntity<'a, Table<T, E>, E>
where T: TableSource, T::Id: Into<T::Value>, T::Value: InvariantValue, E: Entity<T::Value> + 'static, <E as TryIntoRecord<T::Value>>::Error: Debug,

Source§

fn get_ref<E2: Entity<T::Value> + 'static>( &self, relation: &str, ) -> Result<Table<T, E2>>

Source§

impl<'a, T, E> GetRefExt<T, E> for ActiveRecord<'a, Table<T, E>>
where T: TableSource, T::Value: InvariantValue, E: Entity<T::Value> + 'static,

Source§

fn get_ref<E2: Entity<T::Value> + 'static>( &self, relation: &str, ) -> Result<Table<T, E2>>

Implementors§