pub struct Prefix { /* private fields */ }Expand description
The membership prefixes a server uses, in rank order, highest first.
Parsed from PREFIX=(ov)@+, which pairs each mode letter with the character that shows it in a
NAMES reply.
Implementations§
Source§impl Prefix
impl Prefix
Sourcepub fn parse(value: &str) -> Option<Self>
pub fn parse(value: &str) -> Option<Self>
Parse a PREFIX value. A malformed value leaves the default in place, because guessing here
silently corrupts every member list.
Sourcepub fn char_for_mode(&self, mode: char) -> Option<char>
pub fn char_for_mode(&self, mode: char) -> Option<char>
The prefix character a mode letter grants, such as o giving @.
Sourcepub fn mode_for_char(&self, prefix: char) -> Option<char>
pub fn mode_for_char(&self, prefix: char) -> Option<char>
The mode letter a prefix character stands for, such as @ meaning o.
Sourcepub fn is_membership_mode(&self, mode: char) -> bool
pub fn is_membership_mode(&self, mode: char) -> bool
True when this mode letter grants membership status rather than setting a channel mode.
Trait Implementations§
impl Eq for Prefix
impl StructuralPartialEq for Prefix
Auto Trait Implementations§
impl Freeze for Prefix
impl RefUnwindSafe for Prefix
impl Send for Prefix
impl Sync for Prefix
impl Unpin for Prefix
impl UnsafeUnpin for Prefix
impl UnwindSafe for Prefix
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