pub struct DiscordExpander;Expand description
Discord message link expander.
Trait Implementations§
Source§impl LinkExpander for DiscordExpander
impl LinkExpander for DiscordExpander
Source§fn enabled(&self, _config: &BabyriteConfig) -> bool
fn enabled(&self, _config: &BabyriteConfig) -> bool
Discord link expansion is the bot’s core function and has no feature flag.
Source§fn expand_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cx: &'life1 ExpandContext<'life2>,
) -> Pin<Box<dyn Future<Output = Vec<ExpandedContent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn expand_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cx: &'life1 ExpandContext<'life2>,
) -> Pin<Box<dyn Future<Output = Vec<ExpandedContent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Expands Discord message links into embed previews.
Cross-guild links are skipped. The source channel is resolved once — the expanded preview is posted there, so it is needed to verify each link target is at least as visible as that channel. If it cannot be resolved, Discord expansion is skipped entirely (other expanders are unaffected).
Auto Trait Implementations§
impl Freeze for DiscordExpander
impl RefUnwindSafe for DiscordExpander
impl Send for DiscordExpander
impl Sync for DiscordExpander
impl Unpin for DiscordExpander
impl UnsafeUnpin for DiscordExpander
impl UnwindSafe for DiscordExpander
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