pub struct Client {
pub clid: i64,
pub cid: i64,
pub client_database_id: i64,
pub client_nickname: String,
pub client_type: i64,
pub connection_connected_time: i64,
}
Expand description
Client contains a TeamSpeak 3 client.
Example
use sqlib::client;
let client = client::Client {
clid: 1,
cid: 1,
client_database_id: 1,
client_nickname: "John Doe".to_string(),
client_type: 0,
connection_connected_time: 0
};
assert!(client.is_client());
let client_print = format!("{}", client);
assert_eq!("John Doe (0)".to_string(), client_print);
Fields
clid: i64
client id
cid: i64
channel id
client_database_id: i64
client database id
client_nickname: String
client nickname
client_type: i64
client type: 0 is client and 1 is query client
connection_connected_time: i64
connection time in milliseconds
Implementations
sourceimpl Client
impl Client
sourcepub fn new(client_id: i64, nickname: String) -> Client
pub fn new(client_id: i64, nickname: String) -> Client
creates a new client from a client id and a nickname
sourcepub fn update_from_map(client: &Client, map: &StringMap) -> Client
pub fn update_from_map(client: &Client, map: &StringMap) -> Client
updates a given Client from a given map.
sourcepub fn mut_from_map(&mut self, map: &StringMap)
pub fn mut_from_map(&mut self, map: &StringMap)
mutates self from a given map.
Trait Implementations
sourceimpl Ord for Client
impl Ord for Client
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Client> for Client
impl PartialOrd<Client> for Client
sourcefn partial_cmp(&self, other: &Client) -> Option<Ordering>
fn partial_cmp(&self, other: &Client) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Client
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more