pub struct EmoteSet { /* private fields */ }Expand description
name → emote lookup, precedence-respecting (first insert wins).
Implementations§
Source§impl EmoteSet
impl EmoteSet
pub fn new() -> EmoteSet
Sourcepub fn from_list(list: impl IntoIterator<Item = Emote>) -> EmoteSet
pub fn from_list(list: impl IntoIterator<Item = Emote>) -> EmoteSet
build from an API list. the server already ordered by precedence and deduped, but we defend with first-wins so a stray dup can’t override.
pub fn get(&self, name: &str) -> Option<&Emote>
Sourcepub fn names(&self) -> impl Iterator<Item = &str>
pub fn names(&self) -> impl Iterator<Item = &str>
all emote names (unordered) — completion feeds from this.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EmoteSet
impl RefUnwindSafe for EmoteSet
impl Send for EmoteSet
impl Sync for EmoteSet
impl Unpin for EmoteSet
impl UnsafeUnpin for EmoteSet
impl UnwindSafe for EmoteSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more