Struct serenity::model::ChannelId
[−]
[src]
pub struct ChannelId(pub u64);
An identifier for a Channel
Methods
impl ChannelId
[src]
fn find(&self) -> Option<Channel>
Search the cache for the channel with the Id.
fn get(&self) -> Result<Channel>
Search the cache for the channel. If it can't be found, the channel is requested over REST.
fn mention(&self) -> Mention
fn webhooks(&self) -> Result<Vec<Webhook>>
Retrieves the channel's webhooks.
Note: Requires the Manage Webhooks permission.
impl ChannelId
[src]
fn created_at(&self) -> Timespec
Retrieves the time that the Id was created at.
Trait Implementations
impl From<Channel> for ChannelId
[src]
impl From<PrivateChannel> for ChannelId
[src]
fn from(private_channel: PrivateChannel) -> ChannelId
Gets the Id of a private channel.
impl From<GuildChannel> for ChannelId
[src]
fn from(public_channel: GuildChannel) -> ChannelId
Gets the Id of a guild channel.
impl Mentionable for ChannelId
[src]
impl Copy for ChannelId
[src]
impl Clone for ChannelId
[src]
fn clone(&self) -> ChannelId
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for ChannelId
[src]
impl Eq for ChannelId
[src]
impl Hash for ChannelId
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl PartialOrd for ChannelId
[src]
fn partial_cmp(&self, __arg_0: &ChannelId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &ChannelId) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &ChannelId) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &ChannelId) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &ChannelId) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for ChannelId
[src]
fn cmp(&self, __arg_0: &ChannelId) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl Display for ChannelId
[src]
impl From<u64> for ChannelId
[src]
impl PartialEq for ChannelId
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.