#[repr(packed(1))]pub struct MessageId(/* private fields */);
Expand description
An identifier for a Message
Implementations§
source§impl MessageId
impl MessageId
sourcepub fn link(&self, channel_id: ChannelId, guild_id: Option<GuildId>) -> String
Available on crate feature model
only.
pub fn link(&self, channel_id: ChannelId, guild_id: Option<GuildId>) -> String
model
only.Returns a link referencing this message. When clicked, users will jump to the message. The link will be valid for messages in either private channels or guilds.
sourcepub async fn link_ensured(
&self,
cache_http: impl CacheHttp,
channel_id: ChannelId,
guild_id: Option<GuildId>
) -> String
Available on crate feature model
only.
pub async fn link_ensured( &self, cache_http: impl CacheHttp, channel_id: ChannelId, guild_id: Option<GuildId> ) -> String
model
only.Same as Self::link
but tries to find the GuildId
if it is not provided.
Trait Implementations§
source§impl<'de> Deserialize<'de> for MessageId
impl<'de> Deserialize<'de> for MessageId
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
source§impl From<MessageId> for NonZeroI64
impl From<MessageId> for NonZeroI64
source§fn from(id: MessageId) -> NonZeroI64
fn from(id: MessageId) -> NonZeroI64
Converts to this type from the input type.
source§impl From<MessageId> for NonZeroU64
impl From<MessageId> for NonZeroU64
source§fn from(id: MessageId) -> NonZeroU64
fn from(id: MessageId) -> NonZeroU64
Converts to this type from the input type.
source§impl From<NonZero<u64>> for MessageId
impl From<NonZero<u64>> for MessageId
source§fn from(id: NonZeroU64) -> MessageId
fn from(id: NonZeroU64) -> MessageId
Converts to this type from the input type.
source§impl Ord for MessageId
impl Ord for MessageId
source§impl PartialEq for MessageId
impl PartialEq for MessageId
source§impl PartialOrd for MessageId
impl PartialOrd for MessageId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for MessageId
impl Eq for MessageId
impl StructuralPartialEq for MessageId
Auto Trait Implementations§
impl RefUnwindSafe for MessageId
impl Send for MessageId
impl Sync for MessageId
impl Unpin for MessageId
impl UnwindSafe for MessageId
Blanket Implementations§
source§impl<T> ArgumentConvert for Twhere
T: FromStr,
impl<T> ArgumentConvert for Twhere
T: FromStr,
§type Err = <T as FromStr>::Err
type Err = <T as FromStr>::Err
Available on crate features
utils
and client
only.The associated error which can be returned from parsing.
source§fn convert<'life0, 'async_trait>(
__arg0: impl CacheHttp + 'async_trait,
__arg1: Option<GuildId>,
__arg2: Option<ChannelId>,
s: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<T, <T as ArgumentConvert>::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn convert<'life0, 'async_trait>(
__arg0: impl CacheHttp + 'async_trait,
__arg1: Option<GuildId>,
__arg2: Option<ChannelId>,
s: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<T, <T as ArgumentConvert>::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Available on crate features
utils
and client
only.Parses a string
s
as a command parameter of this type.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> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.