Struct ts3::client::Client [−][src]
pub struct Client { /* fields omitted */ }
Expand description
A Client used to send commands to the serverquery interface.
Implementations
impl Client
[src]
impl Client
[src]pub async fn new<A: ToSocketAddrs>(addr: A) -> Result<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]
impl Client
[src]
impl Client
[src]pub async fn apikeyadd(
&self,
scope: APIKeyScope,
lifetime: Option<u64>,
cldbid: Option<u64>
) -> Result<APIKey>
[src]
pub async fn apikeyadd(
&self,
scope: APIKeyScope,
lifetime: Option<u64>,
cldbid: Option<u64>
) -> Result<APIKey>
[src]Creates a new apikey using the specified scope, for the invoking user. The default
lifetime of a token is 14 days, a zero lifetime means no expiration. It is possible
to create apikeys for other users using b_virtualserver_apikey_manage.
pub async fn apikeydel(&self, id: u64) -> Result<()>
[src]
pub async fn apikeydel(&self, id: u64) -> Result<()>
[src]Delete an apikey. Any apikey owned by the current user can always be deleted. Deleting
apikeys from another user requires b_virtualserver_apikey_manage
.
pub async fn apikeylist(
&self,
cldbid: Option<(u64, bool)>,
start: Option<u64>,
duration: Option<u64>,
count: bool
) -> Result<Vec<APIKey>>
[src]
pub async fn apikeylist(
&self,
cldbid: Option<(u64, bool)>,
start: Option<u64>,
duration: Option<u64>,
count: bool
) -> Result<Vec<APIKey>>
[src]Lists all apikeys owned by the user, or of all users using cldbid
=(0, true).
Usage
of cldbid
=… requires b_virtualserver_apikey_manage
.
pub async fn gm(&self, msg: &str) -> Result<()>
[src]
pub async fn gm(&self, msg: &str) -> Result<()>
[src]Sends a text message to all clients on all virtual servers in the TeamSpeak 3 Server instance.
pub async fn login(&self, username: &str, password: &str) -> Result<()>
[src]
pub async fn login(&self, username: &str, password: &str) -> Result<()>
[src]Authenticate with the given data.
pub async fn logout(&self) -> Result<()>
[src]
pub async fn logout(&self) -> Result<()>
[src]Deselects the active virtual server and logs out from the server instance.
pub async fn quit(&self) -> Result<()>
[src]
pub async fn quit(&self) -> Result<()>
[src]Send a quit command, disconnecting the client and closing the TCP connection
pub async fn sendtextmessage(
&self,
target: TextMessageTarget,
msg: &str
) -> Result<()>
[src]
&self,
target: TextMessageTarget,
msg: &str
) -> Result<()>
pub async fn servergroupaddclient(
&self,
sgid: usize,
cldbid: usize
) -> Result<()>
[src]
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]
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 servernotifyregister(
&self,
event: ServerNotifyRegister
) -> Result<()>
[src]
pub async fn servernotifyregister(
&self,
event: ServerNotifyRegister
) -> Result<()>
[src]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 serverstart(&self, sid: u64) -> Result<()>
[src]
pub async fn serverstart(&self, sid: u64) -> Result<()>
[src]Starts the virtual server specified with sid. Depending on your permissions, you’re able to start either your own virtual server only or all virtual servers in the server instance.
pub async fn serverstop(&self, sid: u64) -> Result<()>
[src]
pub async fn serverstop(&self, sid: u64) -> Result<()>
[src]Stops the virtual server specified with sid. Depending on your permissions, you’re able to stop either your own virtual server only or all virtual servers in the server instance. The reasonmsg parameter specifies a text message that is sent to the clients before the client disconnects.
pub async fn use_sid(&self, sid: usize) -> Result<()>
[src]
pub async fn use_sid(&self, sid: usize) -> Result<()>
[src]Switch to the virtualserver (voice) with the given server id
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more