32 lines
739 B
Rust
32 lines
739 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct Participant {
|
|
pub id: String,
|
|
pub display_name: String,
|
|
pub avatar_color: String,
|
|
pub is_self: bool,
|
|
pub is_muted: bool,
|
|
pub is_speaking: bool,
|
|
}
|
|
|
|
impl Participant {
|
|
pub fn new(
|
|
id: impl Into<String>,
|
|
display_name: impl Into<String>,
|
|
avatar_color: impl Into<String>,
|
|
is_self: bool,
|
|
is_muted: bool,
|
|
is_speaking: bool,
|
|
) -> Self {
|
|
Self {
|
|
id: id.into(),
|
|
display_name: display_name.into(),
|
|
avatar_color: avatar_color.into(),
|
|
is_self,
|
|
is_muted,
|
|
is_speaking,
|
|
}
|
|
}
|
|
}
|