Trait medea_client_api_proto::EventHandler[][src]

pub trait EventHandler {
    type Output;
#[must_use]    fn on_room_joined<'life0, 'async_trait>(
        &'life0 self,
        member_id: MemberId
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn on_room_left<'life0, 'async_trait>(
        &'life0 self,
        close_reason: CloseReason
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn on_peer_created<'life0, 'async_trait>(
        &'life0 self,
        peer_id: PeerId,
        negotiation_role: NegotiationRole,
        tracks: Vec<Track>,
        ice_servers: Vec<IceServer>,
        force_relay: bool
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn on_sdp_answer_made<'life0, 'async_trait>(
        &'life0 self,
        peer_id: PeerId,
        sdp_answer: String
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn on_local_description_applied<'life0, 'async_trait>(
        &'life0 self,
        peer_id: PeerId,
        sdp_offer: String
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn on_ice_candidate_discovered<'life0, 'async_trait>(
        &'life0 self,
        peer_id: PeerId,
        candidate: IceCandidate
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn on_peers_removed<'life0, 'async_trait>(
        &'life0 self,
        peer_ids: Vec<PeerId>
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn on_peer_updated<'life0, 'async_trait>(
        &'life0 self,
        peer_id: PeerId,
        updates: Vec<PeerUpdate>,
        negotiation_role: Option<NegotiationRole>
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn on_connection_quality_updated<'life0, 'async_trait>(
        &'life0 self,
        partner_member_id: MemberId,
        quality_score: ConnectionQualityScore
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn on_state_synchronized<'life0, 'async_trait>(
        &'life0 self,
        state: Room
    ) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Handler of Event variants.

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

Associated Types

type Output[src]

Output type of all functions from this trait.

Loading content...

Required methods

#[must_use]fn on_room_joined<'life0, 'async_trait>(
    &'life0 self,
    member_id: MemberId
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Handles Event::RoomJoined variant of Event.

#[must_use]fn on_room_left<'life0, 'async_trait>(
    &'life0 self,
    close_reason: CloseReason
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Handles Event::RoomLeft variant of Event.

#[must_use]fn on_peer_created<'life0, 'async_trait>(
    &'life0 self,
    peer_id: PeerId,
    negotiation_role: NegotiationRole,
    tracks: Vec<Track>,
    ice_servers: Vec<IceServer>,
    force_relay: bool
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Handles Event::PeerCreated variant of Event.

#[must_use]fn on_sdp_answer_made<'life0, 'async_trait>(
    &'life0 self,
    peer_id: PeerId,
    sdp_answer: String
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Handles Event::SdpAnswerMade variant of Event.

#[must_use]fn on_local_description_applied<'life0, 'async_trait>(
    &'life0 self,
    peer_id: PeerId,
    sdp_offer: String
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn on_ice_candidate_discovered<'life0, 'async_trait>(
    &'life0 self,
    peer_id: PeerId,
    candidate: IceCandidate
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn on_peers_removed<'life0, 'async_trait>(
    &'life0 self,
    peer_ids: Vec<PeerId>
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Handles Event::PeersRemoved variant of Event.

#[must_use]fn on_peer_updated<'life0, 'async_trait>(
    &'life0 self,
    peer_id: PeerId,
    updates: Vec<PeerUpdate>,
    negotiation_role: Option<NegotiationRole>
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Handles Event::PeerUpdated variant of Event.

#[must_use]fn on_connection_quality_updated<'life0, 'async_trait>(
    &'life0 self,
    partner_member_id: MemberId,
    quality_score: ConnectionQualityScore
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn on_state_synchronized<'life0, 'async_trait>(
    &'life0 self,
    state: Room
) -> Pin<Box<dyn Future<Output = Self::Output> + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Handles Event::StateSynchronized variant of Event.

Loading content...

Implementors

Loading content...