### InBindingList Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InBindingList.html?search= Examples of how to search within InBindingList. These examples demonstrate different query patterns. ```APIDOC ## Search InBindingList ### Description Provides methods to search within InBindingList. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### Example Searches for Client Connection Information Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InClientConnectionInfoRequest.html?search= Provides examples of how to search for client connection information. These examples demonstrate different search patterns and types. ```APIDOC ## Example Searches ### Search Patterns - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### Example Searches for InClientSetServerQueryLogin Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InClientSetServerQueryLogin.html?search= Provides examples of search queries that can be performed. ```APIDOC ## Example Searches ### Search Queries - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InTokenUsePart.html?search= These are example searches that can be performed on InTokenUsePart. ```APIDOC ## Example Searches ### Description Provides examples of search queries. ### Examples - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InBanListPart Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InBanListPart.html?search= Examples demonstrating how to perform searches within the InBanListPart structure. These examples cover common search patterns. ```APIDOC ## Search Examples ### Description Provides examples of search queries that can be performed. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### Connection::build Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.Connection.html?search= Starts the configuration process for a new server connection. This is the recommended way to initiate a connection. ```APIDOC ## Connection::build ### Description Starts creating the configuration of a new connection. ### Method `Connection::build(address: A)` ### Arguments - `address`: The address of the server (e.g., `SocketAddr`, string, or `ServerAddress`). ### Examples ```rust use futures::prelude::*; use tsclientlib::{Connection, StreamItem}; #[tokio::main] async fn main() { let mut con = Connection::build("localhost").connect().unwrap(); // Wait until connected con.events() .try_filter(|e| future::ready(matches!(e, StreamItem::BookEvents(_)))) .next() .await .unwrap(); } ``` ``` -------------------------------- ### InServerSnapshotCreate Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InServerSnapshotCreate.html?search= Provides examples of search queries that can be used with InServerSnapshotCreate. ```APIDOC ## Search Examples ### Description Examples of search queries for InServerSnapshotCreate. ### Example Searches * std::vec * u32 -> bool * Option, (T -> U) -> Option ``` -------------------------------- ### Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InPluginCommandRequest.html?search= Examples of how to perform searches within the InPluginCommandRequest. ```APIDOC ## Search InPluginCommandRequest ### Description Provides examples for searching within the InPluginCommandRequest structure. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InChannelCreate Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InChannelCreate.html?search= Examples of how to search within InChannelCreate. ```APIDOC ## Search Examples This section provides examples of search queries that can be used with InChannelCreate. ### Example 1: Searching for a specific type ``` std::vec ``` ### Example 2: Searching for a type conversion ``` u32 -> bool ``` ### Example 3: Searching for generic type conversions ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.ClientId.html?search= These are example searches that demonstrate how to find client IDs. ```APIDOC ## Example Searches ### Description Demonstrates various ways to search for client IDs. ### Examples - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InServerEditPart Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InServerEditPart.html?search= Provides examples of search queries that can be performed. These examples demonstrate searching for specific types, type conversions, and generic patterns. ```APIDOC ## Search Examples ### Example 1: Searching for a specific type ``` std::vec ``` ### Example 2: Searching for type conversion ``` u32 -> bool ``` ### Example 3: Searching for generic patterns with transformations ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InServerNotifyRegister.html?search= These are example search queries that can be used. ```APIDOC Example searches: * std::vec * u32 -> bool * Option, (T -> U) -> Option ``` -------------------------------- ### Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InClientUpdate.html?search= Examples of how to structure search queries for InClientUpdate. ```APIDOC ## Search Examples ### Description Provides examples of search queries that can be used with InClientUpdate. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InServerCreate Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InServerCreate.html?search= Provides examples of search queries that can be used for InServerCreate. ```APIDOC ## Search Examples ### Description Examples of how to search for specific types or conversions. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### ConnectOptions::new Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.ConnectOptions.html Starts creating the configuration of a new connection. This method is deprecated and Connection::build should be used instead. ```APIDOC ## ConnectOptions::new ### Description Start creating the configuration of a new connection. ### Deprecated Deprecated since 0.2.0: Connection::build should be used instead. ### Arguments * `address` - The address of the server has to be supplied. The address can be a `SocketAddr`, a string or directly a `ServerAddress`. A string will automatically be resolved from all formats supported by TeamSpeak. For details, see `resolver::resolve`. ``` -------------------------------- ### InChannelEditPart Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InChannelEditPart.html?search= Examples demonstrating how to search within InChannelEditPart. These examples cover various search patterns, including simple types, type conversions, and generic type manipulations. ```APIDOC ## Search Examples ### Example 1: Searching for a specific type ``` std::vec ``` ### Example 2: Searching for type conversions ``` u32 -> bool ``` ### Example 3: Searching for generic type transformations ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.FileUploadResult.html?search= Provides examples of search queries that can be performed. ```APIDOC ## Example Searches This section provides examples of search queries that can be performed. ### Example Queries: * `std::vec` * `u32 -> bool` * `Option, (T -> U) -> Option` ``` -------------------------------- ### IconId Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.IconId.html?search= Provides examples of how to search for IconIds. ```APIDOC ## IconId Search ### Description Provides examples of how to search for IconIds. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.ServerGroupId.html?search= Demonstrates various ways to search for ServerGroupIds. ```APIDOC ## Example Searches This section provides examples of how to search for ServerGroupIds. ### Search Patterns - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InFileDownload Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InFileDownload.html?search= Examples of how to perform searches within InFileDownload structures. ```APIDOC ## Search Examples ### Description Provides examples for searching within InFileDownload structures. ### Examples - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InLogAddPart Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InLogAddPart.html?search= Provides examples of search queries that can be used with InLogAddPart. ```APIDOC ## Example Searches ### Search for a specific type: ``` std::vec ``` ### Search for type conversions: ``` u32 -> bool ``` ### Search for generic type conversions with options: ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InLogout.html?search= Illustrative examples of how to perform searches within the InLogout context. ```APIDOC ## Example Searches This section provides examples of search queries that can be performed. ### Example 1 ``` std::vec ``` ### Example 2 ``` u32 -> bool ``` ### Example 3 ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### Build Connection Configuration Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.ConnectOptions.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Use Connection::build to start creating a new connection configuration. This is the preferred method over `ConnectOptions::new`. ```rust let config = Connection::build("localhost") .name("MyUser") .channel("Default Channel/Nested"); let con = Connection::new(config); ``` -------------------------------- ### Invoker Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.Invoker.html?search= Examples of how to perform searches using the Invoker. ```APIDOC ## Invoker Search ### Description Provides examples of search queries that can be performed. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InPermOverviewRequestPart.html?search= Illustrative examples of how to perform searches. These examples demonstrate common search patterns and types. ```APIDOC ## Search Examples ### Description Examples of search queries. ### Examples - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InServerGroupPermList_search Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InServerGroupPermList.html?search= Examples demonstrating how to perform searches within the InServerGroupPermList_search structure. ```APIDOC ## Search Examples ### Example 1: Searching for a specific vector ``` std::vec ``` ### Example 2: Searching for a type conversion ``` u32 -> bool ``` ### Example 3: Searching for Option type conversion ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### InChannelClientPermListRequest Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InChannelClientPermListRequest.html?search= Examples of how to search within InChannelClientPermListRequest. These examples demonstrate common search patterns. ```APIDOC ## Search Examples ### Query Parameters - **search** (string) - Optional - The search query string. ### Request Example ```json { "search": "std::vec" } ``` ```json { "search": "u32 -> bool" } ``` ```json { "search": "Option, (T -> U) -> Option" } ``` ``` -------------------------------- ### ConnectOptions::new Source: https://docs.rs/tsclientlib/latest/src/tsclientlib/lib.rs.html?search=std%3A%3Avec Starts the configuration for a new connection. ```APIDOC ## ConnectOptions::new ### Description Initializes the connection configuration process by specifying the server address. This is a builder pattern entry point. ### Method `new>(address: A) -> Self` ### Arguments - `address` (A): The address of the server. Can be a `SocketAddr`, a string, or a `ServerAddress`. ``` -------------------------------- ### InCustomSetPart_search Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InCustomSetPart.html?search= Provides examples of search queries that can be used with InCustomSetPart_search. ```APIDOC ## Search Examples ### Description Examples of how to structure search queries for InCustomSetPart_search. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### Example Searches for InInstanceInfo Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InInstanceInfo.html?search= Demonstrates various ways to search and filter instance information. These examples show how to specify types, conversions, and options. ```APIDOC ## Example Searches This section provides examples of search queries that can be used to find specific instance information. ### Search Examples * `std::vec` * `u32 -> bool` * `Option, (T -> U) -> Option` ``` -------------------------------- ### InTokenDelete Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InTokenDelete.html?search= Examples of how to perform searches related to InTokenDelete. These examples demonstrate common search patterns. ```APIDOC ## Search Examples ### Example 1: Searching for a specific type ``` std::vec ``` ### Example 2: Searching for a type conversion ``` u32 -> bool ``` ### Example 3: Searching for generic type conversion with options ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### InInitServer::new Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InInitServer.html?search= Creates a new InInitServer instance from a logger, header, and command arguments. ```APIDOC ## InInitServer::new ### Description Creates a new `InInitServer` instance. ### Signature `fn new( logger: &Logger, header: &InHeader<'_>, args: CommandParser<'_>, ) -> Result` ``` -------------------------------- ### Downloading a File - Rust Source: https://docs.rs/tsclientlib/latest/tsclientlib/sync/struct.SyncConnectionHandle.html Example of how to initiate a file download from a TeamSpeak server using SyncConnectionHandle. Requires a valid ChannelId and a path to the file. ```rust let download = handle.download_file(ChannelId(0), format!("/icon_{}", id), None, None); ``` -------------------------------- ### FiletransferHandle Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.FiletransferHandle.html?search= Examples demonstrating how to perform searches on FiletransferHandle objects. ```APIDOC ## Search Examples This section provides examples of how to search for specific patterns or types within the FiletransferHandle context. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InTokenAdd Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InTokenAdd.html?search= Examples of how to perform searches within InTokenAdd structures. These examples demonstrate common search patterns and types. ```APIDOC ## Search Examples ### Description Examples of common search queries for InTokenAdd structures. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### ServerStart Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/enum.InMessage.html?search= Represents a command to start a server. ```APIDOC ## ServerStart(InServerStart) ### Description Represents a command to start a server. ### Method Not applicable (enum variant) ### Endpoint Not applicable (enum variant) ### Parameters Not applicable (enum variant) ### Request Example Not applicable (enum variant) ### Response Not applicable (enum variant) ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InClientPermList.html?search= Demonstrates various ways to search for client permissions. ```APIDOC ## Example Searches ### Description Provides examples of how to search for client permissions. ### Code Examples #### Search for a specific type ```rust // Example: Search for std::vec search("std::vec"); ``` #### Search for a type conversion ```rust // Example: Search for u32 -> bool conversion search("u32 -> bool"); ``` #### Search for a generic type conversion ```rust // Example: Search for Option, (T -> U) -> Option search("Option, (T -> U) -> Option"); ``` ``` -------------------------------- ### ConnectOptions::new Source: https://docs.rs/tsclientlib/latest/src/tsclientlib/lib.rs.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Start creating the configuration of a new connection. This method is deprecated and `Connection::build` should be used instead. ```APIDOC ## ConnectOptions::new ### Description Start creating the configuration of a new connection. This method is deprecated and `Connection::build` should be used instead. ### Arguments - `address`: `A: Into` - The address of the server. Can be a `SocketAddr`, a string, or a `ServerAddress`. ``` -------------------------------- ### InBanListRequest Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InBanListRequest.html?search= Examples demonstrating how to perform searches within the InBanListRequest. These examples illustrate common search patterns and expected outcomes. ```APIDOC ## InBanListRequest Search ### Description Provides examples of search queries that can be performed on the InBanListRequest. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InTextMessagePart Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InTextMessagePart.html?search= Examples demonstrating how to perform searches within InTextMessagePart structures. ```APIDOC ## Search Examples This section provides examples of search queries that can be used with `InTextMessagePart`. ### Example Queries - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### Resolve Example Domain Source: https://docs.rs/tsclientlib/latest/src/tsclientlib/resolver.rs.html Asynchronously resolves the domain name 'example.com' and verifies that the result includes the expected IP address and the default port. ```rust #[tokio::test] async fn resolve_example() { let logger = get_logger(); let res: Vec<_> = resolve(logger, "example.com".into()).map(|r| r.unwrap()).collect().await; assert!(res.contains(&format!("{}:{}", "93.184.216.34", DEFAULT_PORT).parse().unwrap())); } ``` -------------------------------- ### InFiletransferStatusPart Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InFiletransferStatusPart.html?search= Examples of how to search for InFiletransferStatusPart. ```APIDOC ## Search Examples ### Description Provides examples of search queries for InFiletransferStatusPart. ### Example Searches - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InClientConnectionInfo.html?search= Examples of search queries that can be performed. ```APIDOC ## Search Examples ### Description Examples of search queries that can be performed. ### Example Searches * std::vec * u32 -> bool * Option, (T -> U) -> Option ``` -------------------------------- ### Build connection configuration Source: https://docs.rs/tsclientlib/latest/src/tsclientlib/lib.rs.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Starts the process of building a `ConnectOptions` struct for establishing a new connection. This method is the entry point for configuring connection parameters. ```rust let config = Connection::build("localhost") .name("MyUser") .channel("Default Channel/Nested"); let con = Connection::new(config); ``` -------------------------------- ### MessageHandle Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.MessageHandle.html?search= Provides examples of search queries that can be used with MessageHandle. ```APIDOC ## Search Examples ### Description Examples of how to structure search queries. ### Example Searches * std::vec * u32 -> bool * Option, (T -> U) -> Option ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InClientDbIdFromUid.html?search= Demonstrates various ways to search for client database IDs. ```APIDOC ## Example Searches ### Description Provides examples of how to search for client database IDs. ### Examples - `std::vec` - `u32 -> bool` - `Option, (T -> U) -> Option` ``` -------------------------------- ### InServerTempPasswordDel Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InServerTempPasswordDel.html?search= Examples of how to search for InServerTempPasswordDel. ```APIDOC ## Search Examples ### Example 1: Basic Search ``` std::vec ``` ### Example 2: Type Conversion Search ``` u32 -> bool ``` ### Example 3: Generic Type Conversion Search ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.OutClientPokePart.html?search= Demonstrates various ways to search for OutClientPokePart, including specific types and generic patterns. ```APIDOC ## Example Searches ### Description Provides examples of how to perform searches within the OutClientPokePart structure. ### Code Examples #### Search for a specific type ``` std::vec ``` #### Search for a type conversion ``` u32 -> bool ``` #### Search for a generic type conversion ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### Download an icon file Source: https://docs.rs/tsclientlib/latest/src/tsclientlib/sync.rs.html?search=u32+-%3E+bool Example demonstrating how to download an icon file using the `download_file` method. It specifies the channel ID, a path for the icon, and optionally a password and seek position. ```rust # use tsclientlib::ChannelId; # let handle: tsclientlib::sync::SyncConnectionHandle = panic!(); # let id = 0; # let download = handle.download_file(ChannelId(0), format!("/icon_{}", id), None, None); ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/src/tsclientlib/lib.rs.html?search= Demonstrates common search query patterns. These examples show how to search for specific types, type conversions, and generic type manipulations. ```rust * std::vec ``` ```rust * u32 -> bool ``` ```rust * Option, (T -> U) -> Option ``` -------------------------------- ### ConnectionServerData Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/data/struct.ConnectionServerData.html?search= Examples of how to search for ConnectionServerData. ```APIDOC ## Search Examples ### Example 1: Searching for a specific type ``` std::vec ``` ### Example 2: Searching for a type conversion ``` u32 -> bool ``` ### Example 3: Searching for a generic type conversion ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### SyncConnection::get_options Source: https://docs.rs/tsclientlib/latest/tsclientlib/sync/struct.SyncConnection.html?search=u32+-%3E+bool Get the options which were used to create this connection. ```APIDOC ## get_options ### Description Get the options which were used to create this connection. The identity of the options is updated while connecting if the identity level needs to be improved. ### Method `SyncConnection::get_options(&self) -> &ConnectOptions` ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InFiletransferStatus.html?search= These are example searches that demonstrate how to find InFiletransferStatus. ```APIDOC ## Example Searches ### Description Examples of how to search for InFiletransferStatus. ### Code Examples ``` std::vec ``` ``` u32 -> bool ``` ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### InInitServerPart Methods Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InInitServerPart.html This section outlines the methods available for the InInitServerPart structure. ```APIDOC ## Implementations ### impl InInitServerPart #### pub fn get_invoker(&self) -> Option #### pub fn as_out(&self) -> OutInitServerPart<'_> ``` -------------------------------- ### get_options Source: https://docs.rs/tsclientlib/latest/tsclientlib/sync/struct.SyncConnection.html Get the options which were used to create this connection. ```APIDOC ## get_options ### Description Get the options which were used to create this connection. The identity of the options is updated while connecting if the identity level needs to be improved. ### Signature ```rust pub fn get_options(&self) -> &ConnectOptions ``` ``` -------------------------------- ### Download File Example Source: https://docs.rs/tsclientlib/latest/src/tsclientlib/lib.rs.html?search=u32+-%3E+bool Initiates a file download from a specified channel on the TeamSpeak server. Requires connection and provides a handle for the download process. ```rust let handle_future = con.download_file(ChannelId(0), &format!("/icon_{}", id), None, None); # // TODO Show rest of download ``` -------------------------------- ### Connection::build Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.Connection.html Starts the configuration of a new connection to a TeamSpeak server. The address can be a SocketAddr, a string, or a ServerAddress. ```APIDOC ## pub fn build>(address: A) -> ConnectOptions Start creating the configuration of a new connection. ### Arguments The address of the server has to be supplied. The address can be a `SocketAddr`, a string or directly a `ServerAddress`. A string will automatically be resolved from all formats supported by TeamSpeak. For details, see `resolver::resolve`. ### Examples This will open a connection to the TeamSpeak server at `localhost`. ```rust use tsclientlib::Connection; let mut con = Connection::build("localhost").connect().unwrap(); ``` ``` -------------------------------- ### ClientPermissionHint Initialization Methods Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.ClientPermissionHint.html?search= Provides methods to create ClientPermissionHint instances. `empty()` creates a hint with no permissions, while `all()` creates one with all possible permissions. ```rust pub const fn empty() -> ClientPermissionHint ``` ```rust pub const fn all() -> ClientPermissionHint ``` -------------------------------- ### Example Searches Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InClientNameFromUidRequest.html?search= Illustrative examples of search queries that can be performed. ```APIDOC ## Example Searches ### Description These are example searches to illustrate the expected input format and capabilities. ### Examples * std::vec * u32 -> bool * Option, (T -> U) -> Option ``` -------------------------------- ### Example Search Queries Source: https://docs.rs/tsclientlib/latest/src/tsclientlib/prelude.rs.html?search=u32+-%3E+bool These are example search queries that can be used to find relevant documentation or code. ```text std::vec ``` ```text u32 -> bool ``` ```text Option, (T -> U) -> Option ``` -------------------------------- ### ConnectOptions::output_muted Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.ConnectOptions.html?search=std%3A%3Avec Configures the connection to start with output muted. ```APIDOC ## pub fn output_muted(self, output_muted: bool) -> Self Connect to the server with the output muted. ### Example ```rust let opts = Connection::build("localhost").output_muted(true); ``` ``` -------------------------------- ### InServerInfo::new Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/c2s/struct.InServerInfo.html?search= Constructor for InServerInfo. It takes a logger, header, and command parser to create a new instance. ```APIDOC ### impl InMessageTrait for InServerInfo #### fn new( logger: &Logger, header: &InHeader<'_>, args: CommandParser<'_>, ) -> Result ``` -------------------------------- ### Connect and Disconnect from Server Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.Connection.html Demonstrates connecting to a server, waiting for a connection event, and then disconnecting. The first example uses default disconnect options, while the second specifies a reason and a quit message. ```typescript let mut con = Connection::build("localhost").connect().unwrap(); // Wait until connected con.events() // We are connected when we receive the first BookEvents .try_filter(|e| future::ready(matches!(e, StreamItem::BookEvents(_)))) .next() .await .unwrap(); // Disconnect con.disconnect(DisconnectOptions::new()).unwrap(); con.events().for_each(|_| future::ready(())).await; ``` ```typescript let mut con = Connection::build("localhost").connect().unwrap(); // Wait until connected con.events() // We are connected when we receive the first BookEvents .try_filter(|e| future::ready(matches!(e, StreamItem::BookEvents(_)))) .next() .await .unwrap(); // Disconnect let options = DisconnectOptions::new() .reason(Reason::Clientdisconnect) .message("Away for a while"); con.disconnect(options).unwrap(); con.events().for_each(|_| future::ready(())).await; ``` -------------------------------- ### Uploading a File - Rust Source: https://docs.rs/tsclientlib/latest/tsclientlib/sync/struct.SyncConnectionHandle.html Example of how to initiate a file upload to a TeamSpeak server using SyncConnectionHandle. Requires ChannelId, path, file size, and overwrite flag. ```rust let upload = handle.upload_file(ChannelId(0), "/avatar".to_string(), None, size, true, false); ``` -------------------------------- ### Connection::build Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.Connection.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Starts the configuration for a new connection to a TeamSpeak server. It takes a server address and returns connection options that can be further configured and used to establish a connection. ```APIDOC ## Connection::build>(address: A) -> ConnectOptions ### Description Start creating the configuration of a new connection. ### Arguments * `address` (A: Into): The address of the server. Can be a `SocketAddr`, a string, or a `ServerAddress`. Strings are automatically resolved. ### Returns `ConnectOptions`: An object to configure and establish the connection. ``` -------------------------------- ### ConnectOptions::input_hardware_enabled Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.ConnectOptions.html?search=std%3A%3Avec Configures the connection to start with input hardware disabled. ```APIDOC ## pub fn input_hardware_enabled(self, input_hardware_enabled: bool) -> Self Connect to the server with input hardware disabled state. ### Example ```rust let opts = Connection::build("localhost").input_hardware_enabled(true); ``` ``` -------------------------------- ### Connection::build Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.Connection.html?search=std%3A%3Avec Starts the configuration for a new connection to a TeamSpeak server. It takes the server address as input and returns a ConnectOptions object that can be used to establish the connection. ```APIDOC ## pub fn build>(address: A) -> ConnectOptions ### Description Start creating the configuration of a new connection. ### Arguments * `address`: The address of the server. Can be a `SocketAddr`, a string, or a `ServerAddress`. A string will be automatically resolved from all formats supported by TeamSpeak. ### Returns A `ConnectOptions` object to configure and establish the connection. ``` -------------------------------- ### Connection::build Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.Connection.html?search=u32+-%3E+bool Starts the configuration process for a new connection to a TeamSpeak server. It takes the server address as input and returns a ConnectOptions object that can be further configured and used to establish the connection. ```APIDOC ## Connection::build ### Description Starts creating the configuration of a new connection. ### Method `Connection::build(address: A)` where `A` is `Into` ### Arguments - `address`: The address of the server. Can be a `SocketAddr`, a string, or a `ServerAddress`. ``` -------------------------------- ### InInitServerPart Implementations Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InInitServerPart.html?search= This section outlines the available implementations for the InInitServerPart struct. ```APIDOC ## Implementations ### impl InInitServerPart - `pub fn get_invoker(&self) -> Option` - `pub fn as_out(&self) -> OutInitServerPart<'_>` ``` -------------------------------- ### InMessageIterator Search Examples Source: https://docs.rs/tsclientlib/latest/tsclientlib/messages/s2c/struct.InMessageIterator.html?search= Examples demonstrating how to perform searches within InMessageIterator. These examples cover searching for specific types, type transformations, and generic type patterns. ```APIDOC ## InMessageIterator Search ### Description Provides examples of how to search within `InMessageIterator`. ### Example Searches - Searching for a specific type: ``` std::vec ``` - Searching for a type transformation: ``` u32 -> bool ``` - Searching for generic type patterns: ``` Option, (T -> U) -> Option ``` ### Usage These examples illustrate the syntax for defining search queries to find messages or types within the iterator. ``` -------------------------------- ### ConnectOptions::input_muted Source: https://docs.rs/tsclientlib/latest/tsclientlib/struct.ConnectOptions.html?search=std%3A%3Avec Configures the connection to start with input muted. ```APIDOC ## pub fn input_muted(self, input_muted: bool) -> Self Connect to the server in a muted state. ### Example ```rust let opts = Connection::build("localhost").input_muted(true); ``` ```