pub struct FilterMask(/* private fields */);Expand description
The panel’s per-type filter state.
The value FILTER_ALL means “All” mode — every message is visible and
no individual chip is highlighted. Any other value is an explicit
selection set: a message is visible iff its message_bit is set.
Toggle semantics (matching the spec scenarios):
- Toggling a chip while in
Allmode leavesAlland narrows to only that type. - Toggling a chip in selection mode flips its bit; emptying the set
returns to
All. FilterMask::resetreturns toAllunconditionally.
Implementations§
Source§impl FilterMask
impl FilterMask
Sourcepub fn toggle(&mut self, bit: u16)
pub fn toggle(&mut self, bit: u16)
Toggles a single chip bit, applying the All-mode transition rules.
Sourcepub fn matches(self, msg: &BrokerMessage) -> bool
pub fn matches(self, msg: &BrokerMessage) -> bool
Returns true when the given message passes the active filter.
Sourcepub fn is_chip_active(self, bit: u16) -> bool
pub fn is_chip_active(self, bit: u16) -> bool
Returns true when a chip is part of the active explicit selection.
Always false in All mode (no individual chip is “selected”).
Trait Implementations§
Source§impl Clone for FilterMask
impl Clone for FilterMask
Source§fn clone(&self) -> FilterMask
fn clone(&self) -> FilterMask
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FilterMask
Source§impl Debug for FilterMask
impl Debug for FilterMask
Source§impl Default for FilterMask
impl Default for FilterMask
impl Eq for FilterMask
Source§impl PartialEq for FilterMask
impl PartialEq for FilterMask
Source§fn eq(&self, other: &FilterMask) -> bool
fn eq(&self, other: &FilterMask) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FilterMask
Auto Trait Implementations§
impl Freeze for FilterMask
impl RefUnwindSafe for FilterMask
impl Send for FilterMask
impl Sync for FilterMask
impl Unpin for FilterMask
impl UnsafeUnpin for FilterMask
impl UnwindSafe for FilterMask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more