Skip to main content

TryFromDb

Trait TryFromDb 

Source
pub trait TryFromDb<T>
where Self: Sized,
{ type Error; // Required method fn try_from_db<'async_trait>( value: T, db: Arc<Box<dyn Database>>, ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where Self: 'async_trait; }

Required Associated Types§

Required Methods§

Source

fn try_from_db<'async_trait>( value: T, db: Arc<Box<dyn Database>>, ) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T, U: Send + 'static> TryFromDb<Option<U>> for Option<T>
where T: TryFromDb<U>,

Source§

type Error = <T as TryFromDb<U>>::Error

Source§

fn try_from_db<'async_trait>( value: Option<U>, db: Arc<Box<dyn Database>>, ) -> Pin<Box<dyn Future<Output = Result<Self, T::Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

impl<T, U: Send + 'static> TryFromDb<Vec<U>> for Vec<T>
where T: TryFromDb<U> + Send,

Source§

type Error = <T as TryFromDb<U>>::Error

Source§

fn try_from_db<'async_trait>( value: Vec<U>, db: Arc<Box<dyn Database>>, ) -> Pin<Box<dyn Future<Output = Result<Self, T::Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Implementors§