Trait RpcEventHandler

Source
pub trait RpcEventHandler {
    type Output;

    // Required methods
    fn on_joined_room(
        &self,
        room_id: RoomId,
        member_id: MemberId,
    ) -> Self::Output;
    fn on_left_room(
        &self,
        room_id: RoomId,
        close_reason: CloseReason,
    ) -> Self::Output;
    fn on_event(&self, room_id: RoomId, event: Event) -> Self::Output;
}
Expand description

Handler of RpcEvent variants.

Using RpcEvent::dispatch_with method dispatches RpcEvent variants to appropriate methods of this trait.

Required Associated Types§

Source

type Output

Output type of all functions from this trait.

Required Methods§

Source

fn on_joined_room(&self, room_id: RoomId, member_id: MemberId) -> Self::Output

Handles RpcEvent::JoinedRoom variant of RpcEvent.

Source

fn on_left_room( &self, room_id: RoomId, close_reason: CloseReason, ) -> Self::Output

Handles RpcEvent::LeftRoom variant of RpcEvent.

Source

fn on_event(&self, room_id: RoomId, event: Event) -> Self::Output

Handles RpcEvent::Event variant of RpcEvent.

Implementors§