pub struct Preview {
pub message: Message,
pub channel: GuildChannel,
}Expand description
A preview containing the message and its channel.
Fields§
§message: MessageThe message to preview.
channel: GuildChannelThe channel containing the message.
Implementations§
Source§impl Preview
impl Preview
Sourcepub async fn get(
args: MessageLinkIDs,
ctx: &Context,
) -> Result<Preview, PreviewError>
pub async fn get( args: MessageLinkIDs, ctx: &Context, ) -> Result<Preview, PreviewError>
Retrieves a preview for the given message link.
Fetches the message and channel information, validating that the channel is not NSFW and is publicly accessible.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Preview
impl<'de> Deserialize<'de> for Preview
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
Auto Trait Implementations§
impl Freeze for Preview
impl RefUnwindSafe for Preview
impl Send for Preview
impl Sync for Preview
impl Unpin for Preview
impl UnwindSafe for Preview
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