[][src]Enum irc_async::proto::mode::Mode

pub enum Mode<T> where
    T: ModeType
{ Plus(T, Option<String>), Minus(T, Option<String>), }

A mode argument for the MODE command.

Variants

Plus(T, Option<String>)

Adding the specified mode, optionally with an argument.

Minus(T, Option<String>)

Removing the specified mode, optionally with an argument.

Methods

impl<T> Mode<T> where
    T: ModeType
[src]

pub fn plus(inner: T, arg: Option<&str>) -> Mode<T>[src]

Creates a plus mode with an &str argument.

pub fn minus(inner: T, arg: Option<&str>) -> Mode<T>[src]

Creates a minus mode with an &str argument.

impl Mode<UserMode>[src]

pub fn from_user_mode_string(
    s: &str
) -> Result<Vec<Mode<UserMode>>, MessageParseError>
[src]

Parses the specified mode string as user modes.

impl Mode<ChannelMode>[src]

pub fn from_channel_mode_string(
    s: &str
) -> Result<Vec<Mode<ChannelMode>>, MessageParseError>
[src]

Parses the specified mode string as channel modes.

Trait Implementations

impl<T: Clone> Clone for Mode<T> where
    T: ModeType
[src]

impl<T: PartialEq> PartialEq<Mode<T>> for Mode<T> where
    T: ModeType
[src]

impl<T: Debug> Debug for Mode<T> where
    T: ModeType
[src]

impl<T> Display for Mode<T> where
    T: ModeType
[src]

impl<T> StructuralPartialEq for Mode<T> where
    T: ModeType
[src]

Auto Trait Implementations

impl<T> Send for Mode<T> where
    T: Send

impl<T> Sync for Mode<T> where
    T: Sync

impl<T> Unpin for Mode<T> where
    T: Unpin

impl<T> UnwindSafe for Mode<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Mode<T> where
    T: RefUnwindSafe

Blanket Implementations

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 = !

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.

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

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

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