Skip to main content

Isupport

Struct Isupport 

Source
pub struct Isupport { /* private fields */ }
Expand description

Everything the server told us about itself in 005.

Implementations§

Source§

impl Isupport

Source

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.

Source

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.

Source

pub fn has(&self, name: &str) -> bool

True when the server advertised this token at all.

Source

pub fn number(&self, name: &str) -> Option<u32>

A token whose value is a number, such as LINELEN or MONITOR.

Source

pub fn casemapping(&self) -> Casemapping

How the server folds case.

Source

pub fn fold(&self, name: &str) -> CaseFolded

Fold a nick or channel name into a key.

Source

pub fn prefix(&self) -> &Prefix

The membership prefixes.

Source

pub fn chanmodes(&self) -> &ChanModes

The channel mode classes.

Source

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.

Source

pub fn is_statusmsg(&self, c: char) -> bool

True when this character targets a channel subset, as in @#channel.

Source

pub fn targmax(&self, command: &str) -> Option<u32>

The most messages of one command that may share a line, from TARGMAX.

Trait Implementations§

Source§

impl Clone for Isupport

Source§

fn clone(&self) -> Isupport

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Isupport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Isupport

Source§

fn default() -> Isupport

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.