pub struct PlatformConfig {
pub allowed_user_ids: Vec<String>,
pub require_mention: bool,
pub bot_username: String,
pub session_per_user: bool,
}Expand description
Platform-level access and behaviour controls (whitelist, mention gate, session isolation).
Fields§
§allowed_user_ids: Vec<String>User IDs allowed to send messages to the agent. Empty list means everyone is allowed.
require_mention: boolOnly respond in group chats when the bot is @mentioned. Private / DM chats always get a response regardless of this flag.
bot_username: StringBot username used for @mention detection (without the @). Example: set to “mybot” so @mybot triggers a response.
session_per_user: boolGive each user their own conversation session (default: true). Set to false only when you want all users in a channel to share one session. Not applied to the webhook platform — webhook callers control session routing via payload.
Trait Implementations§
Source§impl Clone for PlatformConfig
impl Clone for PlatformConfig
Source§fn clone(&self) -> PlatformConfig
fn clone(&self) -> PlatformConfig
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 PlatformConfig
impl Debug for PlatformConfig
Source§impl Default for PlatformConfig
impl Default for PlatformConfig
Source§impl<'de> Deserialize<'de> for PlatformConfig
impl<'de> Deserialize<'de> for PlatformConfig
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 PlatformConfig
impl RefUnwindSafe for PlatformConfig
impl Send for PlatformConfig
impl Sync for PlatformConfig
impl Unpin for PlatformConfig
impl UnsafeUnpin for PlatformConfig
impl UnwindSafe for PlatformConfig
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