pub struct Participant {
pub author: Collaborator,
pub joined: DateTime<Utc>,
pub cursor: Option<CursorPosition>,
pub color: Option<String>,
pub selection: Option<Selection>,
}Expand description
A participant in a collaboration session.
Fields§
Author information.
joined: DateTime<Utc>When the participant joined.
cursor: Option<CursorPosition>Participant’s cursor position.
color: Option<String>Assigned color for this participant.
selection: Option<Selection>Current selection.
Implementations§
Source§impl Participant
impl Participant
Sourcepub fn new(author: Collaborator) -> Self
pub fn new(author: Collaborator) -> Self
Create a new participant.
Sourcepub fn with_cursor(self, cursor: CursorPosition) -> Self
pub fn with_cursor(self, cursor: CursorPosition) -> Self
Set cursor position.
Sourcepub fn with_color(self, color: impl Into<String>) -> Self
pub fn with_color(self, color: impl Into<String>) -> Self
Set assigned color.
Trait Implementations§
Source§impl Clone for Participant
impl Clone for Participant
Source§fn clone(&self) -> Participant
fn clone(&self) -> Participant
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Participant
impl Debug for Participant
Source§impl<'de> Deserialize<'de> for Participant
impl<'de> Deserialize<'de> for Participant
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Participant
impl PartialEq for Participant
Source§impl Serialize for Participant
impl Serialize for Participant
impl Eq for Participant
impl StructuralPartialEq for Participant
Auto Trait Implementations§
impl Freeze for Participant
impl RefUnwindSafe for Participant
impl Send for Participant
impl Sync for Participant
impl Unpin for Participant
impl UnsafeUnpin for Participant
impl UnwindSafe for Participant
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.