pub trait UserInterfaceTable {
// Required methods
fn create(
&mut self,
entity: &UserInterface,
) -> Result<UserInterface, RepositoryError>;
fn create_multi(
&mut self,
entities: &[UserInterface],
) -> Result<Vec<UserInterface>, RepositoryError>;
fn get(
&self,
id: &EntityId,
) -> Result<Option<UserInterface>, RepositoryError>;
fn get_multi(
&self,
ids: &[EntityId],
) -> Result<Vec<Option<UserInterface>>, RepositoryError>;
fn get_all(&self) -> Result<Vec<UserInterface>, RepositoryError>;
fn update(
&mut self,
entity: &UserInterface,
) -> Result<UserInterface, RepositoryError>;
fn update_multi(
&mut self,
entities: &[UserInterface],
) -> Result<Vec<UserInterface>, RepositoryError>;
fn update_with_relationships(
&mut self,
entity: &UserInterface,
) -> Result<UserInterface, RepositoryError>;
fn update_with_relationships_multi(
&mut self,
entities: &[UserInterface],
) -> Result<Vec<UserInterface>, RepositoryError>;
fn remove(&mut self, id: &EntityId) -> Result<(), RepositoryError>;
fn remove_multi(&mut self, ids: &[EntityId]) -> Result<(), RepositoryError>;
}Required Methods§
fn create( &mut self, entity: &UserInterface, ) -> Result<UserInterface, RepositoryError>
fn create_multi( &mut self, entities: &[UserInterface], ) -> Result<Vec<UserInterface>, RepositoryError>
fn get(&self, id: &EntityId) -> Result<Option<UserInterface>, RepositoryError>
fn get_multi( &self, ids: &[EntityId], ) -> Result<Vec<Option<UserInterface>>, RepositoryError>
fn get_all(&self) -> Result<Vec<UserInterface>, RepositoryError>
fn update( &mut self, entity: &UserInterface, ) -> Result<UserInterface, RepositoryError>
fn update_multi( &mut self, entities: &[UserInterface], ) -> Result<Vec<UserInterface>, RepositoryError>
fn update_with_relationships( &mut self, entity: &UserInterface, ) -> Result<UserInterface, RepositoryError>
fn update_with_relationships_multi( &mut self, entities: &[UserInterface], ) -> Result<Vec<UserInterface>, RepositoryError>
fn remove(&mut self, id: &EntityId) -> Result<(), RepositoryError>
fn remove_multi(&mut self, ids: &[EntityId]) -> Result<(), RepositoryError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".