TsApiLock

Struct TsApiLock 

Source
pub struct TsApiLock { /* private fields */ }

Methods from Deref<Target = TsApi>§

Source

pub fn get_plugin_id(&self) -> &str

Get the plugin id assigned by TeamSpeak.

Source

pub fn get_servers<'a>(&'a self) -> Vec<Server<'a>>

Get the raw TeamSpeak api functions. These functions can be used to invoke actions that are not yet implemented by this library. You should file a bug report or make a pull request if you need to use this function. Get all servers to which this client is currently connected.

Source

pub fn log_message<S1: AsRef<str>, S2: AsRef<str>>( &self, message: S1, channel: S2, severity: LogLevel, ) -> Result<(), Error>

Log a message using the TeamSpeak logging API.

Source

pub fn log_or_print<S1: AsRef<str>, S2: AsRef<str>>( &self, message: S1, channel: S2, severity: LogLevel, )

Log a message using the TeamSpeak logging API. If that fails, print the message to stdout.

Source

pub fn get_server(&self, server_id: ServerId) -> Option<Server<'_>>

Get the server that has the specified id, returns None if there is no such server.

Source

pub fn get_permission( &self, _permission_id: PermissionId, ) -> Option<&Permission>

Source

pub fn print_message<S: AsRef<str>>(&self, message: S)

Print a message to the currently selected tab. This is only visible in the window of this client and will not be sent to the server.

Source

pub fn get_app_path(&self) -> String

Get the application path of the TeamSpeak executable.

Source

pub fn get_resources_path(&self) -> String

Get the resource path of TeamSpeak.

Source

pub fn get_config_path(&self) -> String

Get the path, where configuration files are stored. This is e.g. ~/.ts3client on linux or %AppData%/TS3Client on Windows.

Source

pub fn get_plugin_path(&self) -> String

Get the path where TeamSpeak plugins are stored.

Trait Implementations§

Source§

impl DerefMut for TsApiLock

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Deref for TsApiLock

Source§

type Target = TsApi

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.