Trait Api

Source
pub trait Api {
    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<Body, Future: Send, ResponseBody: Body<Data = Bytes, Error: Into<Box<dyn Error + Send + Sync + 'static>> + Send> + Send + 'static> + Clone + Send + Sync,