Skip to main content

CapabilitySet

Struct CapabilitySet 

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

A set of capabilities for server advertisement

Implementations§

Source§

impl CapabilitySet

Source

pub fn new() -> Self

Create a new capability set with common IRCv3 capabilities

Source

pub fn stable_only() -> Self

Create a capability set with only stable/ratified capabilities

Source

pub fn bleeding_edge() -> Self

Create a bleeding-edge capability set with all 2024-2025 features

Source

pub fn supports(&self, cap: &Capability) -> bool

Check if a capability is supported

Source

pub fn add(&mut self, cap: Capability)

Add a capability

Source

pub fn remove(&mut self, cap: &Capability) -> bool

Remove a capability

Source

pub fn to_string_list(&self) -> Vec<String>

Convert to string list for CAP LS

Source

pub fn to_cap_ls_string(&self) -> String

Get all capabilities as a formatted string for CAP LS

Trait Implementations§

Source§

impl Default for CapabilitySet

Source§

fn default() -> Self

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V