Struct ts_bookkeeping::Uid[][src]

#[repr(transparent)]
pub struct Uid(pub [u8]);

Implementations

impl Uid[src]

pub fn from_bytes(data: &[u8]) -> &Uid[src]

pub fn as_avatar(&self) -> String[src]

TeamSpeak uses a different encoding of the uid for fetching avatars.

The raw data (base64-decoded) is encoded in hex, but instead of using [0-9a-f] with [a-p].

pub fn is_server_admin(&self) -> bool[src]

Trait Implementations

impl AsRef<Uid> for UidBuf[src]

pub fn as_ref(&self) -> &Uid[src]

Performs the conversion.

impl Borrow<Uid> for UidBuf[src]

pub fn borrow(&self) -> &Uid[src]

Immutably borrows from an owned value. Read more

impl Debug for Uid[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl<'a, 'de> Deserialize<'de> for &'a Uid where
    'de: 'a, 
[src]

pub fn deserialize<D>(d: D) -> Result<&'a Uid, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Display for Uid[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl PartialEq<Uid> for Uid[src]

pub fn eq(&self, other: &Uid) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

pub fn ne(&self, other: &Uid) -> bool[src]

This method tests for !=.

impl RefCast for Uid[src]

type From = [u8]

pub fn ref_cast(_from: &<Uid as RefCast>::From) -> &Uid[src]

pub fn ref_cast_mut(_from: &mut <Uid as RefCast>::From) -> &mut Uid[src]

impl Serialize for Uid[src]

pub fn serialize<__S>(
    &self,
    __serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl ToOwned for Uid[src]

type Owned = UidBuf

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> <Uid as ToOwned>::Owned[src]

Creates owned data from borrowed data, usually by cloning. Read more

fn clone_into(&self, target: &mut Self::Owned)[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

impl Eq for Uid[src]

impl StructuralEq for Uid[src]

impl StructuralPartialEq for Uid[src]

Auto Trait Implementations

impl RefUnwindSafe for Uid

impl Send for Uid

impl !Sized for Uid

impl Sync for Uid

impl Unpin for Uid

impl UnwindSafe for Uid

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> Pipe for T where
    T: ?Sized

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R

Pipes by value. This is generally the method you want to use. Read more

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
    R: 'a, 

Borrows self and passes that borrow into the pipe function. Read more

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
    R: 'a, 

Mutably borrows self and passes that borrow into the pipe function. Read more

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
    Self: Borrow<B>,
    B: 'a + ?Sized,
    R: 'a, 

Borrows self, then passes self.borrow() into the pipe function. Read more

fn pipe_borrow_mut<'a, B, R>(
    &'a mut self,
    func: impl FnOnce(&'a mut B) -> R
) -> R where
    Self: BorrowMut<B>,
    B: 'a + ?Sized,
    R: 'a, 

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
    Self: AsRef<U>,
    U: 'a + ?Sized,
    R: 'a, 

Borrows self, then passes self.as_ref() into the pipe function.

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
    Self: AsMut<U>,
    U: 'a + ?Sized,
    R: 'a, 

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
    Self: Deref<Target = T>,
    T: 'a + ?Sized,
    R: 'a, 

Borrows self, then passes self.deref() into the pipe function.

fn pipe_deref_mut<'a, T, R>(
    &'a mut self,
    func: impl FnOnce(&'a mut T) -> R
) -> R where
    Self: DerefMut<Target = T> + Deref,
    T: 'a + ?Sized,
    R: 'a, 

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]