pub struct GroupSwarm {
pub group_id: u64,
pub max_participants: usize,
/* private fields */
}Expand description
Group swarm - for video calls (symmetric authority)
Fields§
§group_id: u64Group ID
max_participants: usizeMaximum participants
Implementations§
Source§impl GroupSwarm
impl GroupSwarm
Sourcepub fn add_participant(&mut self, node: NodeId, joined_at: StateTime) -> bool
pub fn add_participant(&mut self, node: NodeId, joined_at: StateTime) -> bool
Add a participant
Sourcepub fn remove_participant(&mut self, node: NodeId)
pub fn remove_participant(&mut self, node: NodeId)
Remove a participant
Sourcepub fn participant_count(&self) -> usize
pub fn participant_count(&self) -> usize
Get participant count
Sourcepub fn toggle_video(&mut self, node: NodeId, enabled: bool)
pub fn toggle_video(&mut self, node: NodeId, enabled: bool)
Toggle video for a participant
Sourcepub fn toggle_audio(&mut self, node: NodeId, enabled: bool)
pub fn toggle_audio(&mut self, node: NodeId, enabled: bool)
Toggle audio for a participant
Start screen sharing
Stop screen sharing
Sourcepub fn participants(&self) -> Vec<&ParticipantState>
pub fn participants(&self) -> Vec<&ParticipantState>
Get all participants
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GroupSwarm
impl RefUnwindSafe for GroupSwarm
impl Send for GroupSwarm
impl Sync for GroupSwarm
impl Unpin for GroupSwarm
impl UnsafeUnpin for GroupSwarm
impl UnwindSafe for GroupSwarm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more