Skip to main content

Association

Trait Association 

Source
pub trait Association<T> {
    // Required methods
    fn loaded_child(&mut self, child: T);
    fn assert_loaded_otherwise_failed(&mut self);
}
Expand description

Methods available for all association types.

Required Methods§

Source

fn loaded_child(&mut self, child: T)

Store the loaded child on the association.

Source

fn assert_loaded_otherwise_failed(&mut self)

The association should have been loaded by now, if not store an error inside the association (if applicable for the particular association).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> Association<T> for HasMany<T>

Source§

impl<T> Association<T> for HasManyThrough<T>

Source§

impl<T> Association<T> for HasOne<Box<T>>

Source§

impl<T> Association<T> for HasOne<T>

Source§

impl<T> Association<T> for OptionHasOne<Box<T>>

Source§

impl<T> Association<T> for OptionHasOne<T>