pub trait ChannelReceiver<C: ChannelKind>:
Send
+ Sync
+ 'static {
// Required method
fn on_frame(&self, frame: Frame<C>);
// Provided method
fn on_replay_complete(
&self,
_channel: C,
_from_cursor: u64,
_to_cursor: u64,
) { ... }
}Expand description
Handler for inbound frames on a specific channel.
Implement this trait to receive and process frames for a given channel.
Register with PushClient::on before connecting.
Required Methods§
Provided Methods§
Sourcefn on_replay_complete(&self, _channel: C, _from_cursor: u64, _to_cursor: u64)
fn on_replay_complete(&self, _channel: C, _from_cursor: u64, _to_cursor: u64)
Called when the channel’s replay buffer catches up after reconnect. Default implementation does nothing.
Implementors§
impl<C, F> ChannelReceiver<C> for F
Blanket implementation for closures.