Skip to main content

Fetcher

Trait Fetcher 

Source
pub trait Fetcher<CTXEXT> {
    // Required method
    fn fetch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: Context<CTXEXT>,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<(Ensemble, u64)>, ResponseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for fetching ensemble definitions by ID.

Required Methods§

Source

fn fetch<'life0, 'life1, 'async_trait>( &'life0 self, ctx: Context<CTXEXT>, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<(Ensemble, u64)>, ResponseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetches an ensemble by its ID.

Returns Ok(None) if the ensemble is not found. Returns the ensemble and its creation timestamp if found.

Implementors§

Source§

impl<CTXEXT> Fetcher<CTXEXT> for ObjectiveAiFetcher
where CTXEXT: Send + Sync + 'static,