[−][src]Struct ts3_query::managed::ManagedConfig
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]
addr: A,
server_port: u16,
user: String,
password: String
) -> Result<Self, Ts3Error>
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]
fn clone(&self) -> ManagedConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for ManagedConfig
impl Send for ManagedConfig
impl Sync for ManagedConfig
impl Unpin for ManagedConfig
impl UnwindSafe for ManagedConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,