Enum twilight_model::channel::Channel [−][src]
pub enum Channel { Group(Group), Guild(GuildChannel), Private(PrivateChannel), }
Variants
Group(Group)
Guild(GuildChannel)
Private(PrivateChannel)
Implementations
impl Channel
[src]
impl Channel
[src]pub fn id(&self) -> ChannelId
[src]
Return the ID of the inner channel.
pub fn name(&self) -> Option<&str>
[src]
Return an immutable reference to the name of the inner channel.
The group variant might not always have a name, since they are optional for groups. The guild variant will always have a name. The private variant doesn’t have a name.
Trait Implementations
impl<'de> Deserialize<'de> for Channel
[src]
impl<'de> Deserialize<'de> for Channel
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl StructuralEq for Channel
[src]
impl StructuralEq for Channel
[src]impl StructuralPartialEq for Channel
[src]
impl StructuralPartialEq for Channel
[src]Auto Trait Implementations
impl RefUnwindSafe for Channel
impl RefUnwindSafe for Channel
impl UnwindSafe for Channel
impl UnwindSafe for Channel
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]