[][src]Struct ts3_query::managed::ManagedConfig

pub struct ManagedConfig { /* fields omitted */ }
This is supported on feature="managed" only.

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

impl ManagedConfig[src]

pub fn new<A: ToSocketAddrs>(
    addr: A,
    server_port: u16,
    user: String,
    password: String
) -> Result<Self, Ts3Error>
[src]

This is supported on feature="managed" only.

Create a new ManagedConfig with default values

pub fn name(self, name: String) -> Self[src]

This is supported on feature="managed" only.

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.

pub fn connection_timeout(self, timeout: Duration) -> Self[src]

This is supported on feature="managed" only.

Set connection timeout

pub fn timeout(self, timeout: Duration) -> Self[src]

This is supported on feature="managed" only.

Set timeout for normal IO

Trait Implementations

impl Clone for ManagedConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.