[][src]Struct ts3_query::QueryClient

pub struct QueryClient { /* fields omitted */ }

Ts3 Query client with active connection

Methods

impl QueryClient[src]

pub fn new<A: ToSocketAddrs>(addr: A) -> Result<Self, Ts3Error>[src]

Create new query connection

pub fn raw_command(&mut self, command: &str) -> Result<Vec<String>, Ts3Error>[src]

Perform a raw command, returns its response

You need to escape the command properly.

pub fn whoami(&mut self) -> Result<HashMap<String, String>, Ts3Error>[src]

Performs whoami

Returns a hashmap of entries

pub fn logout(&mut self) -> Result<(), Ts3Error>[src]

Logout

pub fn login(&mut self, user: &str, password: &str) -> Result<(), Ts3Error>[src]

Login with provided data

On drop queryclient issues a logout

pub fn select_server_by_port(&mut self, port: u16) -> Result<(), Ts3Error>[src]

Select server to perform commands on, by port

pub fn create_dir(&mut self, cid: usize, path: &str) -> Result<(), Ts3Error>[src]

Create file directory in channel, has to be a valid path starting with /

Performs ftcreatedir

pub fn delete_file(&mut self, cid: usize, path: &str) -> Result<(), Ts3Error>[src]

Delete File/Folder in channel, acts recursive on folders

Example: /My Directory deletes everything inside that directory.

Performs ftdeletefile

pub fn ping(&mut self) -> Result<(), Ts3Error>[src]

Low-cost connection check

Performs whoami command without parsing

pub fn select_server_by_id(&mut self, sid: usize) -> Result<(), Ts3Error>[src]

Select server to perform commands on, by server id

pub fn server_group_del_clients(
    &mut self,
    group: usize,
    cldbid: &[usize]
) -> Result<(), Ts3Error>
[src]

Performs servergroupdelclient

pub fn server_group_add_clients(
    &mut self,
    group: usize,
    cldbid: &[usize]
) -> Result<(), Ts3Error>
[src]

Performs servergroupaddclient

pub fn get_servergroup_client_list(
    &mut self,
    server_group: usize
) -> Result<Vec<usize>, Ts3Error>
[src]

Get all client database IDs for a given server group ID

See servergroupclientlist

Trait Implementations

impl Drop for QueryClient[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, 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.