Trait TreeIdentity

Source
pub trait TreeIdentity {
    // Required methods
    fn auto_id<'a, I>(descendents: I) -> Result<bool, ToqlError>
       where I: Iterator<Item = FieldPath<'a>>;
    fn set_id<'a, 'b, I>(
        &mut self,
        descendents: I,
        action: &'b IdentityAction,
    ) -> Result<(), ToqlError>
       where I: Iterator<Item = FieldPath<'a>> + Clone;
}
Expand description

Deal with primary and foreign keys in nested structs.

Required Methods§

Source

fn auto_id<'a, I>(descendents: I) -> Result<bool, ToqlError>
where I: Iterator<Item = FieldPath<'a>>,

Returns true, if struct located at descendents has database generated keys.

Source

fn set_id<'a, 'b, I>( &mut self, descendents: I, action: &'b IdentityAction, ) -> Result<(), ToqlError>
where I: Iterator<Item = FieldPath<'a>> + Clone,

Set or refresh keys of structs located at descendents.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> TreeIdentity for Join<T>
where T: Keyed + TreeIdentity, <T as Keyed>::Key: Clone + TryFrom<Vec<SqlArg>, Error = ToqlError>,