Type Definition medea_jason::peer::repo::Component

source ·
pub type Component = Component<State, Repository>;
Expand description

Component responsible for the peer::Component creating and removing.

Implementations§

source§

impl Component

source

pub fn get(&self, id: PeerId) -> Option<Rc<PeerConnection>>

Returns PeerConnection stored in the repository by its ID.

source

pub fn get_all(&self) -> Vec<Rc<PeerConnection>>

Returns all PeerConnections stored in the repository.

source

pub fn connection_lost(&self)

Notifies all peer::Components about a RPC connection loss.

source

pub fn connection_recovered(&self)

Notifies all peer::Components about a RPC connection restore.

source

pub fn apply(&self, new_state: Room)

Updates this State with the provided proto::state::Room.