Trait ApiNoContext

Source
pub trait ApiNoContext<C: Send + Sync> {
    // Required methods
    fn poll_ready(
        &self,
        _cx: &mut Context<'_>,
    ) -> Poll<Result<(), Box<dyn Error + Send + Sync + 'static>>>;
    fn context(&self) -> &C;
    fn add_application<'life0, 'async_trait>(
        &'life0 self,
        application: Application,
    ) -> Pin<Box<dyn Future<Output = Result<AddApplicationResponse, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_application<'life0, 'async_trait>(
        &'life0 self,
        application_id: i64,
        application: Application,
    ) -> Pin<Box<dyn Future<Output = Result<UpdateApplicationResponse, ApiError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

API where Context isn’t passed on every API call

Required Methods§

Source

fn poll_ready( &self, _cx: &mut Context<'_>, ) -> Poll<Result<(), Box<dyn Error + Send + Sync + 'static>>>

Source

fn context(&self) -> &C

Source

fn add_application<'life0, 'async_trait>( &'life0 self, application: Application, ) -> Pin<Box<dyn Future<Output = Result<AddApplicationResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prospective Student applying for a new course

Source

fn update_application<'life0, 'async_trait>( &'life0 self, application_id: i64, application: Application, ) -> Pin<Box<dyn Future<Output = Result<UpdateApplicationResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update an existing application

Implementations on Foreign Types§

Source§

impl<T: Api<C> + Send + Sync, C: Clone + Send + Sync> ApiNoContext<C> for ContextWrapper<T, C>

Source§

fn add_application<'life0, 'async_trait>( &'life0 self, application: Application, ) -> Pin<Box<dyn Future<Output = Result<AddApplicationResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Prospective Student applying for a new course

Source§

fn update_application<'life0, 'async_trait>( &'life0 self, application_id: i64, application: Application, ) -> Pin<Box<dyn Future<Output = Result<UpdateApplicationResponse, ApiError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update an existing application

Source§

fn poll_ready( &self, cx: &mut Context<'_>, ) -> Poll<Result<(), Box<dyn Error + Send + Sync + 'static>>>

Source§

fn context(&self) -> &C

Implementors§