pub enum Mode<T>where
T: ModeType,{
Plus(T, Option<String>),
Minus(T, Option<String>),
NoPrefix(T),
}
Expand description
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.
NoPrefix(T)
No prefix mode, used to query ban list on channel join.
Implementations§
source§impl Mode<UserMode>
impl Mode<UserMode>
sourcepub fn as_user_modes(
pieces: &[&str]
) -> Result<Vec<Mode<UserMode>>, MessageParseError>
pub fn as_user_modes( pieces: &[&str] ) -> Result<Vec<Mode<UserMode>>, MessageParseError>
Parses the specified mode string as user modes.
source§impl Mode<ChannelMode>
impl Mode<ChannelMode>
sourcepub fn as_channel_modes(
pieces: &[&str]
) -> Result<Vec<Mode<ChannelMode>>, MessageParseError>
pub fn as_channel_modes( pieces: &[&str] ) -> Result<Vec<Mode<ChannelMode>>, MessageParseError>
Parses the specified mode string as channel modes.
Trait Implementations§
source§impl<T> PartialEq for Mode<T>
impl<T> PartialEq for Mode<T>
impl<T> StructuralPartialEq for Mode<T>where
T: ModeType,
Auto Trait Implementations§
impl<T> Freeze for Mode<T>where
T: Freeze,
impl<T> RefUnwindSafe for Mode<T>where
T: RefUnwindSafe,
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,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more