[−][src]Struct ts3_query::QueryClient
Ts3 Query client with active connection
Implementations
impl QueryClient
[src]
pub fn new<A: ToSocketAddrs>(addr: A) -> Result<Self, Ts3Error>
[src]
Create new query connection
pub fn with_timeout<A: ToSocketAddrs>(
addr: A,
t_connect: Option<Duration>,
timeout: Option<Duration>
) -> Result<Self, Ts3Error>
[src]
addr: A,
t_connect: Option<Duration>,
timeout: Option<Duration>
) -> Result<Self, Ts3Error>
Create new query connection with timeouts
t_connect
is used for connection, timeout
for read/write operations
pub fn limit_lines(&mut self, limit: usize)
[src]
Set new maximum amount of lines to read per response, until DoS protection triggers.
pub fn limit_line_bytes(&mut self, limit: u64)
[src]
Set new maximum amount of bytes per line to read until DoS protection triggers.
pub fn rename(&mut self, name: &str) -> Result<(), Ts3Error>
[src]
Rename this client, performs clientupdate client_nickname
escaping the name
pub fn update_description(&mut self, descr: &str) -> Result<(), Ts3Error>
[src]
Update this clients description
pub fn raw_command(&mut self, command: &str) -> Result<Vec<String>, Ts3Error>
[src]
Perform a raw command, returns its response as raw value. (No unescaping is performed.)
You need to escape the command properly.
pub fn whoami(
&mut self,
unescape: bool
) -> Result<HashMap<String, String>, Ts3Error>
[src]
&mut self,
unescape: bool
) -> Result<HashMap<String, String>, Ts3Error>
Performs whoami
Returns a hashmap of entries. Values are unescaped if set.
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]
&mut self,
group: usize,
cldbid: &[usize]
) -> Result<(), Ts3Error>
Performs servergroupdelclient
pub fn server_group_add_clients(
&mut self,
group: usize,
cldbid: &[usize]
) -> Result<(), Ts3Error>
[src]
&mut self,
group: usize,
cldbid: &[usize]
) -> Result<(), Ts3Error>
Performs servergroupaddclient
pub fn get_servergroup_client_list(
&mut self,
server_group: usize
) -> Result<Vec<usize>, Ts3Error>
[src]
&mut self,
server_group: usize
) -> Result<Vec<usize>, Ts3Error>
Get a list of client-DB-IDs for a given server group ID
See servergroupclientlist
Trait Implementations
impl Drop for QueryClient
[src]
Auto Trait Implementations
impl RefUnwindSafe for QueryClient
impl Send for QueryClient
impl Sync for QueryClient
impl Unpin for QueryClient
impl UnwindSafe for QueryClient
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, 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>,