pub struct ModeTypes(/* private fields */);
Expand description
A map of the non-status modes to their ModeType
s.
This type explicitly excludes status modes.
Implementations§
Source§impl ModeTypes
impl ModeTypes
Sourcepub fn from_set(set: ModeSet, mode_type: ModeType) -> Self
pub fn from_set(set: ModeSet, mode_type: ModeType) -> Self
Returns a ModeTypes
constructed from one set of modes of a given ModeType
.
Sourcepub fn from_sets(
a: ModeSet,
b: ModeSet,
c: ModeSet,
d: ModeSet,
) -> (Self, ModeSet)
pub fn from_sets( a: ModeSet, b: ModeSet, c: ModeSet, d: ModeSet, ) -> (Self, ModeSet)
Returns a ModeTypes
constructed from the provided sets.
To ensure coherence, any overlaps between sets are removed
and returned as a separate set. Use insert_set()
to add them back.
Sourcepub fn parse(bytes: &[u8]) -> (Self, ModeSet, &[u8])
pub fn parse(bytes: &[u8]) -> (Self, ModeSet, &[u8])
Parses a string as if it’s the value of a CHANMODES
ISUPPORT token.
This function is deliberately permissive to support mode strings with modes that are not
valid Mode
s.
In addition to Self
, returns the rest of the mode string if there are additional
mode types beyond what this type supports.
It also returns any overlapping modes as from_sets
.
Trait Implementations§
impl Copy for ModeTypes
impl Eq for ModeTypes
impl StructuralPartialEq for ModeTypes
Auto Trait Implementations§
impl Freeze for ModeTypes
impl RefUnwindSafe for ModeTypes
impl Send for ModeTypes
impl Sync for ModeTypes
impl Unpin for ModeTypes
impl UnwindSafe for ModeTypes
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