Trait LifecycleListener
Source pub trait LifecycleListener: Send + Sync {
// Provided methods
fn on_event<'a, 'life0, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
event: LifecycleEvent<'a>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait { ... }
fn on_start<'life0, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn on_connecting<'life0, 'life1, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
websocket_url: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn on_connected<'life0, 'life1, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
websocket_url: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn on_websocket_write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
payload: &'life1 str,
result: &'life2 Result<()>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn on_websocket_write_with_retry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
payload: &'life1 str,
cnt: u8,
result: &'life2 Result<()>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn on_websocket_read<'life0, 'life1, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
result: &'life1 Result<Message>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn on_keepalive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
payload: &'life1 str,
result: &'life2 Result<()>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn on_disconnected<'life0, 'life1, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
result: &'life1 Result<()>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn on_stopped<'life0, 'async_trait>(
&'life0 self,
client: Arc<DingTalkStream>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}