Struct SimpleVob
pub struct SimpleVob { /* private fields */ }
Implementations§
§impl SimpleVob
impl SimpleVob
pub fn new() -> SimpleVob
pub fn from_slice(bits: &[bool]) -> SimpleVob
pub fn alloc(size: usize) -> SimpleVob
pub fn alloc_ones(size: usize) -> SimpleVob
pub fn alloc_with_capacity(size: usize, capacity: usize) -> SimpleVob
pub fn len(&self) -> usize
pub fn num_set(&self) -> usize
pub fn to_bin_string(&self) -> String
pub fn negated(&self) -> SimpleVob
pub unsafe fn as_ptr(&self) -> *const u32
pub fn as_slice(&self) -> &[u32]
pub fn iter_set_entries(&self, f: impl FnMut(usize))
pub fn iter_unset_entries(&self, f: impl FnMut(usize))
pub fn iter_entries(&self, f: impl FnMut(bool, usize))
pub fn write_to(&self, buf: &mut [u8])
pub fn allow_token(&mut self, tok: u32)
pub fn disallow_token(&mut self, tok: u32)
pub fn set(&mut self, idx: usize, val: bool)
pub fn resize(&mut self, size: usize)
pub fn get(&self, idx: usize) -> bool
pub fn is_allowed(&self, tok: u32) -> bool
pub fn set_all(&mut self, val: bool)
pub fn apply_to(&self, logits: &mut [f32])
pub fn iter(&self) -> SimpleVobIter<'_> ⓘ
pub fn or(&mut self, other: &SimpleVob)
pub fn and(&mut self, other: &SimpleVob)
pub fn is_zero(&self) -> bool
pub fn and_is_zero(&self, other: &SimpleVob) -> bool
pub fn sub(&mut self, other: &SimpleVob)
pub fn first_bit_set_here_and_in(&self, other: &SimpleVob) -> Option<usize>
pub fn first_bit_set(&self) -> Option<usize>
Trait Implementations§
impl Eq for SimpleVob
Auto Trait Implementations§
impl Freeze for SimpleVob
impl RefUnwindSafe for SimpleVob
impl Send for SimpleVob
impl Sync for SimpleVob
impl Unpin for SimpleVob
impl UnwindSafe for SimpleVob
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any
.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.