[−][src]Struct simple_irc::Prefix
Representation of a parsed message source. This is in the format nick [ [ "!" user ] "@" host ].
let prefix = "nick!user@host".parse::<simple_irc::Prefix>().unwrap(); assert_eq!(&prefix.nick[..], "nick"); assert_eq!(prefix.user.as_deref(), Some("user")); assert_eq!(prefix.host.as_deref(), Some("host"));
Fields
nick: String
user: Option<String>
host: Option<String>
Methods
impl Prefix
[src]
pub fn new(nick: &str) -> Self
[src]
pub fn new_with_all(nick: &str, user: Option<&str>, host: Option<&str>) -> Self
[src]
Trait Implementations
impl Clone for Prefix
[src]
impl Debug for Prefix
[src]
impl Default for Prefix
[src]
impl Display for Prefix
[src]
impl FromStr for Prefix
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(input: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<Prefix> for Prefix
[src]
impl StructuralPartialEq for Prefix
[src]
Auto Trait Implementations
impl RefUnwindSafe for Prefix
impl Send for Prefix
impl Sync for Prefix
impl Unpin for Prefix
impl UnwindSafe for Prefix
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,