Lines Matching refs:usize

50 pub struct CompoundBitSet<T = usize> {
81 const BITS_PER_SCALAR: usize = mem::size_of::<T>() * 8;
104 pub fn with_capacity(capacity: usize) -> Self { in with_capacity()
111 pub fn try_with_capacity(capacity: usize) -> Result<Self, OutOfMemory> { in try_with_capacity()
135 pub fn len(&self) -> usize { in len() argument
136 self.elems.iter().map(|sub| usize::from(sub.len())).sum() in len()
162 pub fn capacity(&self) -> usize { in capacity() argument
190 fn word_and_bit(i: usize) -> (usize, u8) { in word_and_bit() argument
200 fn elem(word: usize, bit: u8) -> usize { in elem() argument
201 let bit = usize::from(bit); in elem()
222 pub fn contains(&self, i: usize) -> bool { in contains()
264 pub fn ensure_capacity(&mut self, n: usize) { in ensure_capacity() argument
271 pub fn try_ensure_capacity(&mut self, n: usize) -> Result<(), OutOfMemory> { in try_ensure_capacity()
287 assert!(word < usize::try_from(isize::MAX).unwrap()); in try_ensure_capacity()
334 pub fn insert(&mut self, i: usize) -> bool { in insert()
367 pub fn remove(&mut self, i: usize) -> bool { in remove()
382 fn update_max(&mut self, word_of_old_max: usize) { in update_max() argument
414 pub fn max(&self) -> Option<usize> { in max() argument
415 self.max.map(|m| usize::try_from(m).unwrap()) in max()
443 pub fn pop(&mut self) -> Option<usize> { in pop() argument
549 Some(n) => 1 + (n as usize / Self::BITS_PER_SCALAR), in iter_scalars()
557 type Item = usize;
568 pub struct Iter<'a, T = usize> {
570 word: usize,
575 type Item = usize;
578 fn next(&mut self) -> Option<usize> { in next() argument