pub struct PartialMessage { /* private fields */ }Expand description
A message known only by its id, as an edit, a deletion or a reaction names it: the client
keeps no message history, so its text and author are not at hand. It acts like a
Message.
Implementations§
Source§impl PartialMessage
impl PartialMessage
Sourcepub fn edit(&self, options: impl Into<EditMessage>) -> Result<()>
pub fn edit(&self, options: impl Into<EditMessage>) -> Result<()>
Edits this message (one of this member’s): new text, or an EditMessage with its
text and new embeds (whose pictures must be attachments the message already has) or
mentions.
§Errors
No text given (Error::Protocol: a partial message does not know its own, and the
protocol replaces it), or as Message::edit.
Sourcepub fn delete(&self) -> Result<()>
pub fn delete(&self) -> Result<()>
Deletes this message (one’s own, or any with MANAGE_MESSAGES).
§Errors
The host refused or did not answer.
Trait Implementations§
Source§impl Clone for PartialMessage
impl Clone for PartialMessage
Source§fn clone(&self) -> PartialMessage
fn clone(&self) -> PartialMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PartialMessage
impl Debug for PartialMessage
Source§impl From<&Message> for PartialMessage
impl From<&Message> for PartialMessage
Auto Trait Implementations§
impl Freeze for PartialMessage
impl RefUnwindSafe for PartialMessage
impl Send for PartialMessage
impl Sync for PartialMessage
impl Unpin for PartialMessage
impl UnsafeUnpin for PartialMessage
impl UnwindSafe for PartialMessage
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