Struct ts3::Client[][src]

pub struct Client { /* fields omitted */ }

A Client used to send commands to the serverquery interface.

Implementations

impl Client[src]

pub async fn new<A: ToSocketAddrs>(addr: A) -> Result<Client>[src]

Create a new connection

pub async fn send(&self, cmd: String) -> Result<RawResp>[src]

Send a raw command directly to the server

impl Client[src]

pub async fn login(&self, username: &str, password: &str) -> Result<()>[src]

Authenticate with the given data.

pub async fn quit(&self) -> Result<()>[src]

Send a quit command, disconnecting the client and closing the TCP connection

pub async fn servergroupaddclient(
    &self,
    sgid: usize,
    cldbid: usize
) -> Result<()>
[src]

Adds one or more clients to the server group specified with sgid. Please note that a client cannot be added to default groups or template groups.

pub async fn servergroupdelclient(
    &self,
    sgid: usize,
    cldbid: usize
) -> Result<()>
[src]

Removes one or more clients specified with cldbid from the server group specified with sgid.

pub async fn use_sid(&self, sid: usize) -> Result<()>[src]

Switch to the virtualserver (voice) with the given server id

pub async fn use_port(&self, port: u16) -> Result<()>[src]

Like use_sid but instead use_port uses the voice port to connect to the virtualserver

pub async fn version(&self) -> Result<RawResp>[src]

Returns information about the server version

pub async fn whoami(&self) -> Result<RawResp>[src]

Returns information about the query client connected

Trait Implementations

impl Clone for Client[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.