Struct irc_rust::Prefix[][src]

pub struct Prefix<'a> { /* fields omitted */ }

Message prefix containing a name (servername or nickname) and optional user and host. If the user and host are set the name is semantically seen as the nickname.

Implementations

impl<'a> Prefix<'a>[src]

pub fn new() -> Self[src]

Create a new Prefix from the given string. Expects the string to be a valid prefix string.

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

pub fn host(&self) -> Option<&str>[src]

pub fn user(&self) -> Option<&str>[src]

pub fn into_parts(self) -> (&'a str, Option<&'a str>, Option<&'a str>)[src]

Trait Implementations

impl<'a> AsRef<str> for Prefix<'a>[src]

impl<'a> Clone for Prefix<'a>[src]

impl<'a> Copy for Prefix<'a>[src]

impl<'a> Debug for Prefix<'a>[src]

impl<'a> Default for Prefix<'a>[src]

impl<'a> Display for Prefix<'a>[src]

impl<'a> Eq for Prefix<'a>[src]

impl<'a> From<&'a str> for Prefix<'a>[src]

impl<'a> Hash for Prefix<'a>[src]

impl<'a> Ord for Prefix<'a>[src]

impl<'a> PartialEq<Prefix<'a>> for Prefix<'a>[src]

impl<'a> PartialOrd<Prefix<'a>> for Prefix<'a>[src]

impl<'a> StructuralEq for Prefix<'a>[src]

impl<'a> StructuralPartialEq for Prefix<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Prefix<'a>

impl<'a> Send for Prefix<'a>

impl<'a> Sync for Prefix<'a>

impl<'a> Unpin for Prefix<'a>

impl<'a> UnwindSafe for Prefix<'a>

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> 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.