pub struct Isupport { /* private fields */ }Expand description
Everything the server told us about itself in 005.
Implementations§
Source§impl Isupport
impl Isupport
Sourcepub fn apply(&mut self, token: &str) -> Token
pub fn apply(&mut self, token: &str) -> Token
Apply one token.
A leading - removes the token and restores the default. A += in place of = appends to
the value already held, which is how draft/extended-isupport-0.2 carries a value too long
for one line. The typed views always see the cumulative value, never the fragment.
Returns what the token turned out to mean, so a caller never has to read the wire grammar a second time to find out.
Sourcepub fn get(&self, name: &str) -> Option<Option<&str>>
pub fn get(&self, name: &str) -> Option<Option<&str>>
The raw value of a token, None if the token is absent, Some(None) if it is a bare flag.
Sourcepub fn number(&self, name: &str) -> Option<u32>
pub fn number(&self, name: &str) -> Option<u32>
A token whose value is a number, such as LINELEN or MONITOR.
Sourcepub fn casemapping(&self) -> Casemapping
pub fn casemapping(&self) -> Casemapping
How the server folds case.
Sourcepub fn fold(&self, name: &str) -> CaseFolded
pub fn fold(&self, name: &str) -> CaseFolded
Fold a nick or channel name into a key.
Sourcepub fn is_channel(&self, name: &str) -> bool
pub fn is_channel(&self, name: &str) -> bool
True when this name starts with a character the server treats as a channel prefix.
CHANTYPES defaults to #& when absent, and Obby adds ^ for voice channels and $ for
stream channels, which arrive in this token like any other.
Sourcepub fn is_statusmsg(&self, c: char) -> bool
pub fn is_statusmsg(&self, c: char) -> bool
True when this character targets a channel subset, as in @#channel.