pub trait ModelResultExt<DB>: Model<DB>{
// Required methods
fn save_result<'a, E>(
&'a mut self,
executor: E,
) -> impl Future<Output = PremixResult<()>>
where E: IntoExecutor<'a, DB = DB>;
fn update_result<'a, E>(
&'a mut self,
executor: E,
) -> impl Future<Output = PremixResult<UpdateResult>>
where E: IntoExecutor<'a, DB = DB>;
fn delete_result<'a, E>(
&'a mut self,
executor: E,
) -> impl Future<Output = PremixResult<()>>
where E: IntoExecutor<'a, DB = DB>;
}Expand description
Convenience helpers that map sqlx errors into PremixError.
Required Methods§
Sourcefn save_result<'a, E>(
&'a mut self,
executor: E,
) -> impl Future<Output = PremixResult<()>>where
E: IntoExecutor<'a, DB = DB>,
fn save_result<'a, E>(
&'a mut self,
executor: E,
) -> impl Future<Output = PremixResult<()>>where
E: IntoExecutor<'a, DB = DB>,
Save the model and return PremixError on failure.
Sourcefn update_result<'a, E>(
&'a mut self,
executor: E,
) -> impl Future<Output = PremixResult<UpdateResult>>where
E: IntoExecutor<'a, DB = DB>,
fn update_result<'a, E>(
&'a mut self,
executor: E,
) -> impl Future<Output = PremixResult<UpdateResult>>where
E: IntoExecutor<'a, DB = DB>,
Update the model and return PremixError on failure.
Sourcefn delete_result<'a, E>(
&'a mut self,
executor: E,
) -> impl Future<Output = PremixResult<()>>where
E: IntoExecutor<'a, DB = DB>,
fn delete_result<'a, E>(
&'a mut self,
executor: E,
) -> impl Future<Output = PremixResult<()>>where
E: IntoExecutor<'a, DB = DB>,
Delete the model and return PremixError on failure.
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.