pub struct ChannelContext<'a> {
pub sender_id: &'a str,
pub chat_id: &'a str,
pub channel: &'a str,
pub sender_in_allowlist: bool,
pub allowlist_configured: bool,
pub threat_is_caution: bool,
pub trusted_sender_ids: &'a [String],
}Expand description
Inputs describing what a channel adapter knows about the sender.
Fields§
§sender_id: &'a strSender’s platform-specific ID (chat ID, phone number, etc.).
chat_id: &'a strChat/group/guild ID, if distinct from sender (e.g., Telegram chat ID).
channel: &'a strPlatform name (e.g., “telegram”, “discord”, “api”).
sender_in_allowlist: boolWhether the sender passed the adapter’s allow-list check.
allowlist_configured: boolWhether the adapter’s allow-list is non-empty (has entries).
threat_is_caution: boolWhether the threat scanner flagged this input as Caution-level.
trusted_sender_ids: &'a [String]The global channels.trusted_sender_ids list.
Trait Implementations§
Source§impl<'a> Clone for ChannelContext<'a>
impl<'a> Clone for ChannelContext<'a>
Source§fn clone(&self) -> ChannelContext<'a>
fn clone(&self) -> ChannelContext<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ChannelContext<'a>
impl<'a> RefUnwindSafe for ChannelContext<'a>
impl<'a> Send for ChannelContext<'a>
impl<'a> Sync for ChannelContext<'a>
impl<'a> Unpin for ChannelContext<'a>
impl<'a> UnsafeUnpin for ChannelContext<'a>
impl<'a> UnwindSafe for ChannelContext<'a>
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