Struct ts3::client::Client [−][src]
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 fn set_event_handler<H: EventHandler + 'static>(&self, handler: H)
[src]
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]
&self,
sgid: usize,
cldbid: usize
) -> Result<()>
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]
&self,
sgid: usize,
cldbid: usize
) -> Result<()>
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 servernotifyregister(
&self,
event: ServerNotifyRegister
) -> Result<()>
[src]
&self,
event: ServerNotifyRegister
) -> Result<()>
Registers for a specified category of events on a virtual server to receive notification messages. Depending on the notifications you've registered for, the server will send you a message on every event in the view of your ServerQuery client (e.g. clients joining your channel, incoming text messages, server configuration changes, etc). The event source is declared by the event parameter while id can be used to limit the notifications to a specific channel.
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
Auto Trait Implementations
impl !RefUnwindSafe for Client
[src]
impl Send for Client
[src]
impl Sync for Client
[src]
impl Unpin for Client
[src]
impl !UnwindSafe for Client
[src]
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,