Skip to main content

Blocks

Struct Blocks 

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

the blocked emotes: key → the name it was blocked under (“” when learned from the account and never seen here yet), in the order they were blocked.

Implementations§

Source§

impl Blocks

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Source

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

Source

pub fn add(&mut self, key: String, name: &str) -> bool

true when newly added. a known key learns its name if it had none.

Source

pub fn remove(&mut self, key: &str) -> Option<String>

the name it was filed under, when it was blocked.

Source

pub fn list(&self) -> Vec<(String, String)>

(key, name) in block order.

Source

pub fn keys_named(&self, name: &str) -> Vec<String>

keys blocked under this name (exact, case-sensitive).

Source

pub fn hides(&self, e: &Emote) -> bool

is this exact emote blocked — under any key any client files it by.

Source

pub fn held(&self, e: &Emote) -> Vec<String>

the keys held for this exact emote (to unblock every form).

Trait Implementations§

Source§

impl Clone for Blocks

Source§

fn clone(&self) -> Self

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 Blocks

Source§

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

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

impl Default for Blocks

Source§

fn default() -> Self

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

impl PartialEq for Blocks

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Blocks

Auto Trait Implementations§

§

impl Forget for Blocks

§

impl Freeze for Blocks

§

impl Move for Blocks

§

impl RefUnwindSafe for Blocks

§

impl Send for Blocks

§

impl Sync for Blocks

§

impl Unpin for Blocks

§

impl UnsafeUnpin for Blocks

§

impl UnwindSafe for Blocks

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.