Enum irc::proto::mode::Mode
[−]
[src]
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]
T: ModeType,
fn plus(inner: T, arg: Option<&str>) -> Mode<T>
[src]
Creates a plus mode with an &str
argument.
fn minus(inner: T, arg: Option<&str>) -> Mode<T>
[src]
Creates a minus mode with an &str
argument.
impl Mode<UserMode>
[src]
fn as_user_modes(s: &str) -> Result<Vec<Mode<UserMode>>, MessageParseError>
[src]
Parses the specified mode string as user modes.
impl Mode<ChannelMode>
[src]
fn as_channel_modes(
s: &str
) -> Result<Vec<Mode<ChannelMode>>, MessageParseError>
[src]
s: &str
) -> Result<Vec<Mode<ChannelMode>>, MessageParseError>
Parses the specified mode string as channel modes.
Trait Implementations
impl<T: Clone> Clone for Mode<T> where
T: ModeType,
[src]
T: ModeType,
fn clone(&self) -> Mode<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Mode<T> where
T: ModeType,
[src]
T: ModeType,
impl<T: PartialEq> PartialEq for Mode<T> where
T: ModeType,
[src]
T: ModeType,
fn eq(&self, __arg_0: &Mode<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Mode<T>) -> bool
[src]
This method tests for !=
.
impl<T> Display for Mode<T> where
T: ModeType,
[src]
T: ModeType,