NickGroup

Struct NickGroup 

Source
pub struct NickGroup<'a> { /* private fields */ }
Expand description

Weechat nicklist Group type.

Implementations§

Source§

impl<'a> NickGroup<'a>

Source

pub fn name(&self) -> Cow<'_, str>

Get the name of the group.

Source

pub fn color(&self) -> Cow<'_, str>

Get the color of the group.

Source

pub fn visible(&self) -> bool

Is the nick group visible.

Source

pub fn level(&self) -> u32

Get the group nesting level.

Returns 0 if this is the root group, 1 if it’s a child of the root group.

Source

pub fn add_nick(&self, nick_settings: NickSettings<'_>) -> Result<Nick<'_>, ()>

Create and add a new nick to the buffer nicklist under this group.

§Arguments
  • nick_settings - Nick arguments struct for the nick that should be added.

Returns the newly created nick if one is created successfully, an empty error otherwise.

Source

pub fn search_nick(&self, nick: &str) -> Option<Nick<'_>>

Search for a nick in this nick group.

§Arguments
  • nick - The name of the nick that should be found.

Returns a Nick if one is found, None otherwise.

Auto Trait Implementations§

§

impl<'a> Freeze for NickGroup<'a>

§

impl<'a> !RefUnwindSafe for NickGroup<'a>

§

impl<'a> !Send for NickGroup<'a>

§

impl<'a> !Sync for NickGroup<'a>

§

impl<'a> Unpin for NickGroup<'a>

§

impl<'a> !UnwindSafe for NickGroup<'a>

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, 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.