Trait Participants
pub trait Participants {
// Required methods
fn join_participant(&mut self, participant: &ParticipantId) -> bool;
fn leave_participant(&mut self, participant: &ParticipantId);
// Provided methods
fn set_participant_label(
&mut self,
_participant: &ParticipantId,
_label: &str,
) { ... }
fn participant_presence(
&self,
_doc: &AutoCommit,
) -> Vec<ParticipantPresence> { ... }
fn set_participant_host(&mut self, _host: bool) { ... }
}Expand description
A widget that keeps a view per remote participant (a caret, a selection), published under that participant’s identity.
Required Methods§
fn join_participant(&mut self, participant: &ParticipantId) -> bool
fn join_participant(&mut self, participant: &ParticipantId) -> bool
Start a view for participant; true when it is new.
fn leave_participant(&mut self, participant: &ParticipantId)
fn leave_participant(&mut self, participant: &ParticipantId)
Drop the participant’s view (its task ended). Idempotent.
Provided Methods§
fn set_participant_label(&mut self, _participant: &ParticipantId, _label: &str)
fn set_participant_label(&mut self, _participant: &ParticipantId, _label: &str)
Name shown beside the participant’s caret.
fn participant_presence(&self, _doc: &AutoCommit) -> Vec<ParticipantPresence>
fn participant_presence(&self, _doc: &AutoCommit) -> Vec<ParticipantPresence>
Current presence of every participant this widget holds a view for, derived from that participant’s own view exactly as the local window derives its own.
fn set_participant_host(&mut self, _host: bool)
fn set_participant_host(&mut self, _host: bool)
The host serves only remote participants and has no local person (a
headless host worker). The widget then publishes its
participant-independent catalogue schema
(tilo_actions::schema) instead of one
caret’s snapshot, so the publication does not change when a caret moves.