pub enum Channel {
Public(PublicChannel),
Private(PrivateChannel),
Presence(PresenceChannel),
Encrypted(EncryptedChannel),
}Expand description
Type-safe channel representation
Variants§
Public(PublicChannel)
Private(PrivateChannel)
Presence(PresenceChannel)
Encrypted(EncryptedChannel)
Implementations§
Source§impl Channel
impl Channel
Sourcepub fn from_string(s: impl Into<String>) -> Result<Self>
pub fn from_string(s: impl Into<String>) -> Result<Self>
Creates a channel from a string, automatically detecting the type
Sourcepub fn channel_type(&self) -> ChannelType
pub fn channel_type(&self) -> ChannelType
Gets the channel type
Sourcepub fn requires_auth(&self) -> bool
pub fn requires_auth(&self) -> bool
Checks if the channel requires authentication
Sourcepub fn is_encrypted(&self) -> bool
pub fn is_encrypted(&self) -> bool
Checks if the channel is encrypted
Trait Implementations§
impl Eq for Channel
impl StructuralPartialEq for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnsafeUnpin 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