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
impl Component
sourcepub fn get(&self, id: PeerId) -> Option<Rc<PeerConnection>>
pub fn get(&self, id: PeerId) -> Option<Rc<PeerConnection>>
Returns PeerConnection
stored in the repository by its ID.
sourcepub fn get_all(&self) -> Vec<Rc<PeerConnection>>
pub fn get_all(&self) -> Vec<Rc<PeerConnection>>
Returns all PeerConnection
s stored in the repository.
sourcepub fn connection_lost(&self)
pub fn connection_lost(&self)
Notifies all peer::Component
s about a RPC connection loss.
sourcepub fn connection_recovered(&self)
pub fn connection_recovered(&self)
Notifies all peer::Component
s about a RPC connection restore.
sourcepub fn apply(&self, new_state: Room)
pub fn apply(&self, new_state: Room)
Updates this State
with the provided proto::state::Room
.