pub struct ClientBuilder { /* private fields */ }Expand description
Configures a Client. The directory holds the SimpleX store and zaun/, the community
keys and state; give every client its own.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
The SimpleX profile name a new store starts with.
Sourcepub fn relay(self, address: impl Into<String>) -> Self
pub fn relay(self, address: impl Into<String>) -> Self
Adds a relay: an SMP server (smp://…) or an XFTP file server (xftp://…). With no
SMP server the official SimpleX servers are used, and with them the official file
servers unless an xftp:// one is given. Uploads go only to these file servers, so
they must be among the ones a community’s host downloads from
(CommunityData::attachments).
Sourcepub fn log(self, sink: impl Write + Send + 'static) -> Self
pub fn log(self, sink: impl Write + Send + 'static) -> Self
Where the SimpleX client logs (stderr by default).
Sourcepub const fn timeout(self, timeout: Duration) -> Self
pub const fn timeout(self, timeout: Duration) -> Self
How long a command waits for the host’s answer (60 s by default).
Sourcepub const fn join_timeout(self, timeout: Duration) -> Self
pub const fn join_timeout(self, timeout: Duration) -> Self
How long a join or a community creation may take, connection included (120 s).
Sourcepub const fn transfer_timeout(self, timeout: Duration) -> Self
pub const fn transfer_timeout(self, timeout: Duration) -> Self
How long an attachment upload or download may take (10 minutes by default).