pub struct Boolset { /* private fields */ }Expand description
A compact boolean set stored as a bit array
Implementations§
Source§impl Boolset
impl Boolset
Sourcepub fn from_base64(encoded: &str) -> Result<Self, DecodeError>
pub fn from_base64(encoded: &str) -> Result<Self, DecodeError>
Create a Boolset from a base64-encoded string
Sourcepub fn from_data(base64_str: Option<&str>, raw: Option<Vec<u8>>) -> Self
pub fn from_data(base64_str: Option<&str>, raw: Option<Vec<u8>>) -> Self
Create a Boolset from an optional base64 string, falling back to raw bytes or empty This mimics the TypeScript constructor behavior
Sourcepub fn and(&self, other: &Boolset) -> Boolset
pub fn and(&self, other: &Boolset) -> Boolset
Perform bitwise AND with another Boolset, returning a new Boolset
Sourcepub fn or(&self, other: &Boolset) -> Boolset
pub fn or(&self, other: &Boolset) -> Boolset
Perform bitwise OR with another Boolset, returning a new Boolset
Sourcepub fn set(&mut self, index: usize, enabled: bool) -> &mut Self
pub fn set(&mut self, index: usize, enabled: bool) -> &mut Self
Set or clear a bit at the given index Returns a mutable reference to self for method chaining
Trait Implementations§
impl Eq for Boolset
impl StructuralPartialEq for Boolset
Auto Trait Implementations§
impl Freeze for Boolset
impl RefUnwindSafe for Boolset
impl Send for Boolset
impl Sync for Boolset
impl Unpin for Boolset
impl UnsafeUnpin for Boolset
impl UnwindSafe for Boolset
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§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.