[][src]Struct hexchat::UserString

pub struct UserString { /* fields omitted */ }

Represents a userstring, typically formatted like nick!user@address.

Methods

impl UserString[src]

pub fn new(mask: impl Into<String>) -> Option<Self>[src]

Creates a new UserString from a user string. Must be in nick!user@address form. Returns the newly created userstring, or None if mask was not formatted correctly.

pub fn from_parts(nick: &str, username: &str, address: &str) -> Option<Self>[src]

Creates a UserString from the nick, username, and address components. Returns the new userstring, or None if address was incorrectly formatted.

pub fn as_str(&self) -> &str[src]

Gets the userstring.

pub fn into_string(self) -> String[src]

Consumes this object and returns the inner userstring.

pub fn get_nick(&self) -> IrcIdentRef[src]

Gets the nick component of the userstring.

pub fn get_username(&self) -> IrcIdentRef[src]

Gets the username component of the userstring.

pub fn get_address(&self) -> &str[src]

Gets the address component of the userstring.

pub fn get_host(&self) -> &str[src]

Gets the host component of the address.

pub fn get_domain(&self) -> &str[src]

Gets the domain component of the address.

Trait Implementations

impl Clone for UserString[src]

impl Debug for UserString[src]

impl Deref for UserString[src]

type Target = str

The resulting type after dereferencing.

impl Display for UserString[src]

impl Eq for UserString[src]

impl From<UserString> for UserMask[src]

impl Hash for UserString[src]

impl Into<String> for UserString[src]

impl Ord for UserString[src]

impl PartialEq<UserString> for UserString[src]

impl PartialOrd<UserString> for UserString[src]

impl StructuralEq for UserString[src]

impl StructuralPartialEq for UserString[src]

impl TryFrom<String> for UserString[src]

type Error = ()

The type returned in the event of a conversion error.

impl TryFrom<UserMask> for UserString[src]

type Error = ()

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.