pub struct BotAccessSettings {
pub is_access_restricted: bool,
pub added_users: Option<Vec<User>>,
}Expand description
Represents the access settings of a bot.
Fields§
§is_access_restricted: boolWhether only selected users can access the bot.
The bot’s owner can always access it.
added_users: Option<Vec<User>>The list of other users who have access to the bot if the access is restricted.
Implementations§
Source§impl BotAccessSettings
impl BotAccessSettings
Sourcepub fn with_added_users<T>(self, value: T) -> BotAccessSettingswhere
T: IntoIterator<Item = User>,
pub fn with_added_users<T>(self, value: T) -> BotAccessSettingswhere
T: IntoIterator<Item = User>,
Sets a new list of added users
§Arguments
value- The list of other users who have access to the bot.
Sourcepub fn with_is_access_restricted(self, value: bool) -> BotAccessSettings
pub fn with_is_access_restricted(self, value: bool) -> BotAccessSettings
Sets a new value for the is_access_restricted_flag.
§Arguments
value- Whether the only selected users can access the bot.
Trait Implementations§
Source§impl Clone for BotAccessSettings
impl Clone for BotAccessSettings
Source§fn clone(&self) -> BotAccessSettings
fn clone(&self) -> BotAccessSettings
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 BotAccessSettings
impl Debug for BotAccessSettings
Source§impl Default for BotAccessSettings
impl Default for BotAccessSettings
Source§fn default() -> BotAccessSettings
fn default() -> BotAccessSettings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BotAccessSettings
impl<'de> Deserialize<'de> for BotAccessSettings
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BotAccessSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BotAccessSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BotAccessSettings
impl Serialize for BotAccessSettings
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for BotAccessSettings
impl RefUnwindSafe for BotAccessSettings
impl Send for BotAccessSettings
impl Sync for BotAccessSettings
impl Unpin for BotAccessSettings
impl UnsafeUnpin for BotAccessSettings
impl UnwindSafe for BotAccessSettings
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