pub struct BotFarmBuilder { /* private fields */ }Available on crate features
farm and ffi only.Implementations§
Source§impl BotFarmBuilder
impl BotFarmBuilder
pub fn new(name: impl Into<String>, db_opts: DbOpts) -> Self
Sourcepub fn with_default_user(self, user: DefaultUser) -> Self
pub fn with_default_user(self, user: DefaultUser) -> Self
Override the default user created for empty databases.
By default the default user name matches the bot name. This setting allows to create a user different from an active bot
Sourcepub fn max_event_latency(self, latency: Duration) -> Self
pub fn max_event_latency(self, latency: Duration) -> Self
Set max permissible event latency. See WorkerConfig::max_event_latency for details
Sourcepub fn max_instances(self, instances: usize) -> Self
pub fn max_instances(self, instances: usize) -> Self
Set max concurrent SimpleX-Chat instances. See WorkerConfig::max_instances for details
Sourcepub async fn launch(
self,
) -> Result<BotFarm<Init<Client, CoreResult<CoreEvent>>>, BotInitError>
pub async fn launch( self, ) -> Result<BotFarm<Init<Client, CoreResult<CoreEvent>>>, BotInitError>
Initialise the SimpleX FFI runtime and return a farm
Trait Implementations§
Source§impl Clone for BotFarmBuilder
impl Clone for BotFarmBuilder
Source§fn clone(&self) -> BotFarmBuilder
fn clone(&self) -> BotFarmBuilder
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 BotFarmBuilder
impl RefUnwindSafe for BotFarmBuilder
impl Send for BotFarmBuilder
impl Sync for BotFarmBuilder
impl Unpin for BotFarmBuilder
impl UnsafeUnpin for BotFarmBuilder
impl UnwindSafe for BotFarmBuilder
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