pub trait ProjectRepository:
Clone
+ Send
+ Sync {
type Conn;
// Required methods
fn fetch_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
id: i64,
) -> Pin<Box<dyn Future<Output = Result<ProjectModel, LightSpeedError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn exists_by_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, LightSpeedError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: NewModel<ProjectData>,
) -> Pin<Box<dyn Future<Output = Result<ProjectModel, LightSpeedError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: ProjectModel,
) -> Pin<Box<dyn Future<Output = Result<ProjectModel, LightSpeedError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: ProjectModel,
) -> Pin<Box<dyn Future<Output = Result<ProjectModel, LightSpeedError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Associated Types§
Required Methods§
fn fetch_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
id: i64,
) -> Pin<Box<dyn Future<Output = Result<ProjectModel, LightSpeedError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn exists_by_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, LightSpeedError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: NewModel<ProjectData>,
) -> Pin<Box<dyn Future<Output = Result<ProjectModel, LightSpeedError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: ProjectModel,
) -> Pin<Box<dyn Future<Output = Result<ProjectModel, LightSpeedError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Conn,
model: ProjectModel,
) -> Pin<Box<dyn Future<Output = Result<ProjectModel, LightSpeedError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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.