pub struct ManagedConfig { /* private fields */ }
This is supported on crate feature managed only.
Expand description

Config for creating a managed connection

use std::time::Duration;
let cfg = ManagedConfig::new("127.0.0.1:10011",9987,"serveradmin".into(),"asdf".into())?
.name("my test bot".to_string())
.connection_timeout(Duration::from_secs(1))
.timeout(Duration::from_secs(1));

Implementations

Create a new ManagedConfig with default values

Set name of client for connection
All names have to be shorter than MAX_LEN_NAME. This is required as you always have to leave enough space for teamspeak to allow appending a unique number. Otherwise connections will fail if the name is already claimed and too long to be made unique.
This is a limitation of the teamspeak API.

Set connection timeout

Set timeout for normal IO

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.