pub struct Channel {
pub description: Option<String>,
pub max_users: u32,
pub name: String,
pub children: Vec<Channel>,
pub users: Vec<User>,
/* private fields */
}Expand description
A representation of a channel in a Mumble server.
Fields§
§description: Option<String>The description of the channel, if set.
max_users: u32The maximum number of allowed users in this channel.
name: StringThe name of this channel.
children: Vec<Channel>Any children this channel has.
users: Vec<User>This channel’s connected users.
Implementations§
Source§impl Channel
impl Channel
Sourcepub fn new(name: String, description: Option<String>, max_users: u32) -> Self
pub fn new(name: String, description: Option<String>, max_users: u32) -> Self
Create a new Channel representation.
Sourcepub fn iter(&self) -> Iter<'_> ⓘ
pub fn iter(&self) -> Iter<'_> ⓘ
Create an iterator over this channel and its children in a pre-order traversal which ensures that parent channels are returned before any of its children.
Sourcepub fn users_iter(&self) -> UsersIter<'_> ⓘ
pub fn users_iter(&self) -> UsersIter<'_> ⓘ
Create an iterator over this channel and its childrens connected users in a pre-order traversal.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Channel
impl<'de> Deserialize<'de> for Channel
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
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more