Trait CallbackApi

Source
pub trait CallbackApi {
    type Error;

    // Required method
    fn on_event<'life0, 'async_trait>(
        &'life0 self,
        request: Request,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

API for receiving callbacks from a media server.

Both API client and API server should implement this trait.

Required Associated Types§

Source

type Error

Error returned by this CallbackApi.

Required Methods§

Source

fn on_event<'life0, 'async_trait>( &'life0 self, request: Request, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fires when a certain callback Event happens on a media server.

Implementors§

Source§

impl<T> Api for CallbackApiClient<T>
where T: GrpcService<BoxBody> + Clone + Send + Sync, T::Future: Send, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Send, Box<dyn Error + Send + Sync + 'static>: From<<T::ResponseBody as Body>::Error>,