pub struct BotSettings {
pub display_name: String,
pub auto_accept: Option<String>,
pub profile_settings: Option<BotProfileSettings>,
pub avatar: Option<ImagePreview>,
}Expand description
Passed to Bot::init to configure bot identity and startup behaviour.
Fields§
§display_name: String§auto_accept: Option<String>If string is empty creates an auto-accepting address without a message. If string is not empty adds a welcome message to the address
profile_settings: Option<BotProfileSettings>§avatar: Option<ImagePreview>Implementations§
Source§impl BotSettings
impl BotSettings
pub fn new(name: impl Into<String>) -> Self
pub fn with_avatar(self, avatar: ImagePreview) -> Self
Sourcepub fn auto_accept(self) -> Self
pub fn auto_accept(self) -> Self
Create a public auto-accepting address during the intialisation
Sourcepub fn auto_accept_with(self, welcome_message: impl Into<String>) -> Self
pub fn auto_accept_with(self, welcome_message: impl Into<String>) -> Self
Create a public auto-accepting address with a welcome meesage during the intialisation
pub fn with_profile_settings(self, settings: BotProfileSettings) -> Self
Trait Implementations§
Source§impl Clone for BotSettings
impl Clone for BotSettings
Source§fn clone(&self) -> BotSettings
fn clone(&self) -> BotSettings
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 moreAuto Trait Implementations§
impl Freeze for BotSettings
impl RefUnwindSafe for BotSettings
impl Send for BotSettings
impl Sync for BotSettings
impl Unpin for BotSettings
impl UnsafeUnpin for BotSettings
impl UnwindSafe for BotSettings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more