pub struct Collaborator {
pub name: String,
pub email: Option<String>,
pub avatar: Option<String>,
pub user_id: Option<String>,
pub color: Option<String>,
}Expand description
Collaborator information for comments and changes.
Fields§
§name: StringDisplay name.
email: Option<String>Email address.
avatar: Option<String>Avatar URL.
user_id: Option<String>User ID in an external system.
color: Option<String>Color for real-time cursor coloring (e.g., “#FF5733” or “blue”).
Implementations§
Source§impl Collaborator
impl Collaborator
Sourcepub fn with_email(self, email: impl Into<String>) -> Self
pub fn with_email(self, email: impl Into<String>) -> Self
Set email.
Sourcepub fn with_avatar(self, avatar: impl Into<String>) -> Self
pub fn with_avatar(self, avatar: impl Into<String>) -> Self
Set avatar URL.
Sourcepub fn with_user_id(self, user_id: impl Into<String>) -> Self
pub fn with_user_id(self, user_id: impl Into<String>) -> Self
Set user ID.
Sourcepub fn with_color(self, color: impl Into<String>) -> Self
pub fn with_color(self, color: impl Into<String>) -> Self
Set color for real-time cursor coloring.
Trait Implementations§
Source§impl Clone for Collaborator
impl Clone for Collaborator
Source§fn clone(&self) -> Collaborator
fn clone(&self) -> Collaborator
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 Collaborator
impl Debug for Collaborator
Source§impl<'de> Deserialize<'de> for Collaborator
impl<'de> Deserialize<'de> for Collaborator
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 Collaborator
impl PartialEq for Collaborator
Source§impl Serialize for Collaborator
impl Serialize for Collaborator
impl Eq for Collaborator
impl StructuralPartialEq for Collaborator
Auto Trait Implementations§
impl Freeze for Collaborator
impl RefUnwindSafe for Collaborator
impl Send for Collaborator
impl Sync for Collaborator
impl Unpin for Collaborator
impl UnsafeUnpin for Collaborator
impl UnwindSafe for Collaborator
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.