Struct NickSettings

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

Settings to create a new nick.

Implementations§

Source§

impl<'a> NickSettings<'a>

Source

pub fn new(name: &str) -> NickSettings<'_>

Create new empyt nick creation settings.

§Arguments
  • name - The name of the new nick.
Source

pub fn set_color(self, color: &'a str) -> NickSettings<'a>

Set the color of the nick.

§Arguments
  • color - The color that the nick should have.
Source

pub fn set_prefix(self, prefix: &'a str) -> NickSettings<'a>

Set the prefix of the nick.

§Arguments
  • prefix - The prefix displayed before the nick in the nicklist.
Source

pub fn set_prefix_color(self, prefix_color: &'a str) -> NickSettings<'a>

Set the color of the nick prefix.

§Arguments
  • prefix_color - The color that the prefix should have.
Source

pub fn set_visible(self, visible: bool) -> NickSettings<'a>

Set the visibility of the nick.

§Arguments
  • visible - Should the nick be visible in the nicklist, true if it should be visible, false otherwise. Defaults to true.

Auto Trait Implementations§

§

impl<'a> Freeze for NickSettings<'a>

§

impl<'a> RefUnwindSafe for NickSettings<'a>

§

impl<'a> Send for NickSettings<'a>

§

impl<'a> Sync for NickSettings<'a>

§

impl<'a> Unpin for NickSettings<'a>

§

impl<'a> UnwindSafe for NickSettings<'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.