Struct roaring::bitmap::RoaringBitmap
source · [−]pub struct RoaringBitmap { /* private fields */ }
Expand description
A compressed bitmap using the Roaring bitmap compression scheme.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
// insert all primes less than 10
rb.insert(2);
rb.insert(3);
rb.insert(5);
rb.insert(7);
println!("total bits set to true: {}", rb.len());
Implementations
sourceimpl RoaringBitmap
impl RoaringBitmap
sourcepub fn is_disjoint(&self, other: &Self) -> bool
pub fn is_disjoint(&self, other: &Self) -> bool
Returns true if the set has no elements in common with other. This is equivalent to checking for an empty intersection.
Examples
use roaring::RoaringBitmap;
let mut rb1 = RoaringBitmap::new();
let mut rb2 = RoaringBitmap::new();
rb1.insert(1);
assert_eq!(rb1.is_disjoint(&rb2), true);
rb2.insert(1);
assert_eq!(rb1.is_disjoint(&rb2), false);
sourcepub fn is_subset(&self, other: &Self) -> bool
pub fn is_subset(&self, other: &Self) -> bool
Returns true
if this set is a subset of other
.
Examples
use roaring::RoaringBitmap;
let mut rb1 = RoaringBitmap::new();
let mut rb2 = RoaringBitmap::new();
rb1.insert(1);
assert_eq!(rb1.is_subset(&rb2), false);
rb2.insert(1);
assert_eq!(rb1.is_subset(&rb2), true);
rb1.insert(2);
assert_eq!(rb1.is_subset(&rb2), false);
sourcepub fn is_superset(&self, other: &Self) -> bool
pub fn is_superset(&self, other: &Self) -> bool
Returns true
if this set is a superset of other
.
Examples
use roaring::RoaringBitmap;
let mut rb1 = RoaringBitmap::new();
let mut rb2 = RoaringBitmap::new();
rb1.insert(1);
assert_eq!(rb2.is_superset(&rb1), false);
rb2.insert(1);
assert_eq!(rb2.is_superset(&rb1), true);
rb1.insert(2);
assert_eq!(rb2.is_superset(&rb1), false);
sourceimpl RoaringBitmap
impl RoaringBitmap
sourcepub fn new() -> RoaringBitmap
pub fn new() -> RoaringBitmap
sourcepub fn full() -> RoaringBitmap
pub fn full() -> RoaringBitmap
sourcepub fn insert(&mut self, value: u32) -> bool
pub fn insert(&mut self, value: u32) -> bool
Adds a value to the set.
Returns whether the value was absent from the set.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
assert_eq!(rb.insert(3), true);
assert_eq!(rb.insert(3), false);
assert_eq!(rb.contains(3), true);
sourcepub fn insert_range<R>(&mut self, range: R) -> u64where
R: RangeBounds<u32>,
pub fn insert_range<R>(&mut self, range: R) -> u64where
R: RangeBounds<u32>,
Inserts a range of values. Returns the number of inserted values.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
rb.insert_range(2..4);
assert!(rb.contains(2));
assert!(rb.contains(3));
assert!(!rb.contains(4));
sourcepub fn push(&mut self, value: u32) -> bool
pub fn push(&mut self, value: u32) -> bool
Pushes value
in the bitmap only if it is greater than the current maximum value.
Returns whether the value was inserted.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
assert!(rb.push(1));
assert!(rb.push(3));
assert_eq!(rb.push(3), false);
assert!(rb.push(5));
assert_eq!(rb.iter().collect::<Vec<u32>>(), vec![1, 3, 5]);
sourcepub fn remove(&mut self, value: u32) -> bool
pub fn remove(&mut self, value: u32) -> bool
Removes a value from the set. Returns true
if the value was present in the set.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
rb.insert(3);
assert_eq!(rb.remove(3), true);
assert_eq!(rb.remove(3), false);
assert_eq!(rb.contains(3), false);
sourcepub fn remove_range<R>(&mut self, range: R) -> u64where
R: RangeBounds<u32>,
pub fn remove_range<R>(&mut self, range: R) -> u64where
R: RangeBounds<u32>,
Removes a range of values. Returns the number of removed values.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
rb.insert(2);
rb.insert(3);
assert_eq!(rb.remove_range(2..4), 2);
sourcepub fn contains(&self, value: u32) -> bool
pub fn contains(&self, value: u32) -> bool
Returns true
if this set contains the specified integer.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
rb.insert(1);
assert_eq!(rb.contains(0), false);
assert_eq!(rb.contains(1), true);
assert_eq!(rb.contains(100), false);
sourcepub fn contains_range<R>(&self, range: R) -> boolwhere
R: RangeBounds<u32>,
pub fn contains_range<R>(&self, range: R) -> boolwhere
R: RangeBounds<u32>,
Returns true
if all values in the range are present in this set.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
// An empty range is always contained
assert!(rb.contains_range(7..7));
rb.insert_range(1..0xFFF);
assert!(rb.contains_range(1..0xFFF));
assert!(rb.contains_range(2..0xFFF));
// 0 is not contained
assert!(!rb.contains_range(0..2));
// 0xFFF is not contained
assert!(!rb.contains_range(1..=0xFFF));
sourcepub fn range_cardinality<R>(&self, range: R) -> u64where
R: RangeBounds<u32>,
pub fn range_cardinality<R>(&self, range: R) -> u64where
R: RangeBounds<u32>,
Returns the number of elements in this set which are in the passed range.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
rb.insert_range(0x10000..0x40000);
rb.insert(0x50001);
rb.insert(0x50005);
rb.insert(u32::MAX);
assert_eq!(rb.range_cardinality(0..0x10000), 0);
assert_eq!(rb.range_cardinality(0x10000..0x40000), 0x30000);
assert_eq!(rb.range_cardinality(0x50000..0x60000), 2);
assert_eq!(rb.range_cardinality(0x10000..0x10000), 0);
assert_eq!(rb.range_cardinality(0x50000..=u32::MAX), 3);
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clears all integers in this set.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
rb.insert(1);
assert_eq!(rb.contains(1), true);
rb.clear();
assert_eq!(rb.contains(1), false);
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if there are no integers in this set.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
assert_eq!(rb.is_empty(), true);
rb.insert(3);
assert_eq!(rb.is_empty(), false);
sourcepub fn is_full(&self) -> bool
pub fn is_full(&self) -> bool
Returns true
if there are every possible integers in this set.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::full();
assert!(!rb.is_empty());
assert!(rb.is_full());
sourcepub fn len(&self) -> u64
pub fn len(&self) -> u64
Returns the number of distinct integers added to the set.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
assert_eq!(rb.len(), 0);
rb.insert(3);
assert_eq!(rb.len(), 1);
rb.insert(3);
rb.insert(4);
assert_eq!(rb.len(), 2);
sourcepub fn min(&self) -> Option<u32>
pub fn min(&self) -> Option<u32>
Returns the minimum value in the set (if the set is non-empty).
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
assert_eq!(rb.min(), None);
rb.insert(3);
rb.insert(4);
assert_eq!(rb.min(), Some(3));
sourcepub fn max(&self) -> Option<u32>
pub fn max(&self) -> Option<u32>
Returns the maximum value in the set (if the set is non-empty).
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
assert_eq!(rb.max(), None);
rb.insert(3);
rb.insert(4);
assert_eq!(rb.max(), Some(4));
sourcepub fn rank(&self, value: u32) -> u64
pub fn rank(&self, value: u32) -> u64
Returns the number of integers that are <= value. rank(u32::MAX) == len()
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
assert_eq!(rb.rank(0), 0);
rb.insert(3);
rb.insert(4);
assert_eq!(rb.rank(3), 1);
assert_eq!(rb.rank(10), 2)
sourcepub fn select(&self, n: u32) -> Option<u32>
pub fn select(&self, n: u32) -> Option<u32>
Returns the n
th integer in the set or None
if n >= len()
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
assert_eq!(rb.select(0), None);
rb.append(vec![0, 10, 100]);
assert_eq!(rb.select(0), Some(0));
assert_eq!(rb.select(1), Some(10));
assert_eq!(rb.select(2), Some(100));
assert_eq!(rb.select(3), None);
sourceimpl RoaringBitmap
impl RoaringBitmap
sourcepub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'_>impl Iterator for Iter<'_> type Item = u32;
pub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'_>impl Iterator for Iter<'_> type Item = u32;
Iterator over each value stored in the RoaringBitmap, guarantees values are ordered by value.
Examples
use roaring::RoaringBitmap;
use std::iter::FromIterator;
let bitmap = (1..3).collect::<RoaringBitmap>();
let mut iter = bitmap.iter();
assert_eq!(iter.next(), Some(1));
assert_eq!(iter.next(), Some(2));
assert_eq!(iter.next(), None);
sourceimpl RoaringBitmap
impl RoaringBitmap
sourcepub fn from_sorted_iter<I: IntoIterator<Item = u32>>(
iterator: I
) -> Result<RoaringBitmap, NonSortedIntegers>
pub fn from_sorted_iter<I: IntoIterator<Item = u32>>(
iterator: I
) -> Result<RoaringBitmap, NonSortedIntegers>
Create the set from a sorted iterator. Values must be sorted and deduplicated.
The values of the iterator must be ordered and strictly greater than the greatest value in the set. If a value in the iterator doesn’t satisfy this requirement, it is not added and the append operation is stopped.
Returns Ok
with the requested RoaringBitmap
, Err
with the number of elements
that were correctly appended before failure.
Example: Create a set from an ordered list of integers.
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::from_sorted_iter(0..10).unwrap();
assert!(rb.iter().eq(0..10));
Example: Try to create a set from a non-ordered list of integers.
use roaring::RoaringBitmap;
let integers = 0..10u32;
let error = RoaringBitmap::from_sorted_iter(integers.rev()).unwrap_err();
assert_eq!(error.valid_until(), 1);
sourcepub fn append<I: IntoIterator<Item = u32>>(
&mut self,
iterator: I
) -> Result<u64, NonSortedIntegers>
pub fn append<I: IntoIterator<Item = u32>>(
&mut self,
iterator: I
) -> Result<u64, NonSortedIntegers>
Extend the set with a sorted iterator.
The values of the iterator must be ordered and strictly greater than the greatest value in the set. If a value in the iterator doesn’t satisfy this requirement, it is not added and the append operation is stopped.
Returns Ok
with the number of elements appended to the set, Err
with
the number of elements we effectively appended before an error occurred.
Examples
use roaring::RoaringBitmap;
let mut rb = RoaringBitmap::new();
assert_eq!(rb.append(0..10), Ok(10));
assert!(rb.iter().eq(0..10));
sourceimpl RoaringBitmap
impl RoaringBitmap
sourcepub fn intersection_len(&self, other: &RoaringBitmap) -> u64
pub fn intersection_len(&self, other: &RoaringBitmap) -> u64
Computes the len of the intersection with the specified other bitmap without creating a new bitmap.
This is faster and more space efficient when you’re only interested in the cardinality of the intersection.
Examples
use roaring::RoaringBitmap;
let rb1: RoaringBitmap = (1..4).collect();
let rb2: RoaringBitmap = (3..5).collect();
assert_eq!(rb1.intersection_len(&rb2), (rb1 & rb2).len());
sourcepub fn union_len(&self, other: &RoaringBitmap) -> u64
pub fn union_len(&self, other: &RoaringBitmap) -> u64
Computes the len of the union with the specified other bitmap without creating a new bitmap.
This is faster and more space efficient when you’re only interested in the cardinality of the union.
Examples
use roaring::RoaringBitmap;
let rb1: RoaringBitmap = (1..4).collect();
let rb2: RoaringBitmap = (3..5).collect();
assert_eq!(rb1.union_len(&rb2), (rb1 | rb2).len());
sourcepub fn difference_len(&self, other: &RoaringBitmap) -> u64
pub fn difference_len(&self, other: &RoaringBitmap) -> u64
Computes the len of the difference with the specified other bitmap without creating a new bitmap.
This is faster and more space efficient when you’re only interested in the cardinality of the difference.
Examples
use roaring::RoaringBitmap;
let rb1: RoaringBitmap = (1..4).collect();
let rb2: RoaringBitmap = (3..5).collect();
assert_eq!(rb1.difference_len(&rb2), (rb1 - rb2).len());
sourcepub fn symmetric_difference_len(&self, other: &RoaringBitmap) -> u64
pub fn symmetric_difference_len(&self, other: &RoaringBitmap) -> u64
Computes the len of the symmetric difference with the specified other bitmap without creating a new bitmap.
This is faster and more space efficient when you’re only interested in the cardinality of the symmetric difference.
Examples
use roaring::RoaringBitmap;
let rb1: RoaringBitmap = (1..4).collect();
let rb2: RoaringBitmap = (3..5).collect();
assert_eq!(rb1.symmetric_difference_len(&rb2), (rb1 ^ rb2).len());
sourceimpl RoaringBitmap
impl RoaringBitmap
sourcepub fn serialized_size(&self) -> usize
pub fn serialized_size(&self) -> usize
Return the size in bytes of the serialized output. This is compatible with the official C/C++, Java and Go implementations.
Examples
use roaring::RoaringBitmap;
let rb1: RoaringBitmap = (1..4).collect();
let mut bytes = Vec::with_capacity(rb1.serialized_size());
rb1.serialize_into(&mut bytes).unwrap();
let rb2 = RoaringBitmap::deserialize_from(&bytes[..]).unwrap();
assert_eq!(rb1, rb2);
sourcepub fn serialize_into<W: Write>(&self, writer: W) -> Result<()>
pub fn serialize_into<W: Write>(&self, writer: W) -> Result<()>
Serialize this bitmap into the standard Roaring on-disk format. This is compatible with the official C/C++, Java and Go implementations.
Examples
use roaring::RoaringBitmap;
let rb1: RoaringBitmap = (1..4).collect();
let mut bytes = vec![];
rb1.serialize_into(&mut bytes).unwrap();
let rb2 = RoaringBitmap::deserialize_from(&bytes[..]).unwrap();
assert_eq!(rb1, rb2);
sourcepub fn deserialize_from<R: Read>(reader: R) -> Result<RoaringBitmap>
pub fn deserialize_from<R: Read>(reader: R) -> Result<RoaringBitmap>
Deserialize a bitmap into memory from the standard Roaring on-disk format. This is compatible with the official C/C++, Java and Go implementations. This method checks that all of the internal values are valid. If deserializing from a trusted source consider RoaringBitmap::deserialize_unchecked_from
Examples
use roaring::RoaringBitmap;
let rb1: RoaringBitmap = (1..4).collect();
let mut bytes = vec![];
rb1.serialize_into(&mut bytes).unwrap();
let rb2 = RoaringBitmap::deserialize_from(&bytes[..]).unwrap();
assert_eq!(rb1, rb2);
sourcepub fn deserialize_unchecked_from<R: Read>(reader: R) -> Result<RoaringBitmap>
pub fn deserialize_unchecked_from<R: Read>(reader: R) -> Result<RoaringBitmap>
Deserialize a bitmap into memory from the standard Roaring on-disk format. This is compatible with the official C/C++, Java and Go implementations. This method is memory safe but will not check if the data is a valid bitmap.
Examples
use roaring::RoaringBitmap;
let rb1: RoaringBitmap = (1..4).collect();
let mut bytes = vec![];
rb1.serialize_into(&mut bytes).unwrap();
let rb2 = RoaringBitmap::deserialize_unchecked_from(&bytes[..]).unwrap();
assert_eq!(rb1, rb2);
Trait Implementations
sourceimpl BitAnd<&RoaringBitmap> for &RoaringBitmap
impl BitAnd<&RoaringBitmap> for &RoaringBitmap
sourcefn bitand(self, rhs: &RoaringBitmap) -> RoaringBitmap
fn bitand(self, rhs: &RoaringBitmap) -> RoaringBitmap
An intersection
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the &
operator.
sourceimpl BitAnd<&RoaringBitmap> for RoaringBitmap
impl BitAnd<&RoaringBitmap> for RoaringBitmap
sourcefn bitand(self, rhs: &RoaringBitmap) -> RoaringBitmap
fn bitand(self, rhs: &RoaringBitmap) -> RoaringBitmap
An intersection
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the &
operator.
sourceimpl BitAnd<RoaringBitmap> for &RoaringBitmap
impl BitAnd<RoaringBitmap> for &RoaringBitmap
sourcefn bitand(self, rhs: RoaringBitmap) -> RoaringBitmap
fn bitand(self, rhs: RoaringBitmap) -> RoaringBitmap
An intersection
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the &
operator.
sourceimpl BitAnd<RoaringBitmap> for RoaringBitmap
impl BitAnd<RoaringBitmap> for RoaringBitmap
sourcefn bitand(self, rhs: RoaringBitmap) -> RoaringBitmap
fn bitand(self, rhs: RoaringBitmap) -> RoaringBitmap
An intersection
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the &
operator.
sourceimpl BitAndAssign<&RoaringBitmap> for RoaringBitmap
impl BitAndAssign<&RoaringBitmap> for RoaringBitmap
sourcefn bitand_assign(&mut self, rhs: &RoaringBitmap)
fn bitand_assign(&mut self, rhs: &RoaringBitmap)
An intersection
between two sets.
sourceimpl BitAndAssign<RoaringBitmap> for RoaringBitmap
impl BitAndAssign<RoaringBitmap> for RoaringBitmap
sourcefn bitand_assign(&mut self, rhs: RoaringBitmap)
fn bitand_assign(&mut self, rhs: RoaringBitmap)
An intersection
between two sets.
sourceimpl BitOr<&RoaringBitmap> for &RoaringBitmap
impl BitOr<&RoaringBitmap> for &RoaringBitmap
sourcefn bitor(self, rhs: &RoaringBitmap) -> RoaringBitmap
fn bitor(self, rhs: &RoaringBitmap) -> RoaringBitmap
An union
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the |
operator.
sourceimpl BitOr<&RoaringBitmap> for RoaringBitmap
impl BitOr<&RoaringBitmap> for RoaringBitmap
sourcefn bitor(self, rhs: &RoaringBitmap) -> RoaringBitmap
fn bitor(self, rhs: &RoaringBitmap) -> RoaringBitmap
An union
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the |
operator.
sourceimpl BitOr<RoaringBitmap> for &RoaringBitmap
impl BitOr<RoaringBitmap> for &RoaringBitmap
sourcefn bitor(self, rhs: RoaringBitmap) -> RoaringBitmap
fn bitor(self, rhs: RoaringBitmap) -> RoaringBitmap
An union
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the |
operator.
sourceimpl BitOr<RoaringBitmap> for RoaringBitmap
impl BitOr<RoaringBitmap> for RoaringBitmap
sourcefn bitor(self, rhs: RoaringBitmap) -> RoaringBitmap
fn bitor(self, rhs: RoaringBitmap) -> RoaringBitmap
An union
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the |
operator.
sourceimpl BitOrAssign<&RoaringBitmap> for RoaringBitmap
impl BitOrAssign<&RoaringBitmap> for RoaringBitmap
sourcefn bitor_assign(&mut self, rhs: &RoaringBitmap)
fn bitor_assign(&mut self, rhs: &RoaringBitmap)
An union
between two sets.
sourceimpl BitOrAssign<RoaringBitmap> for RoaringBitmap
impl BitOrAssign<RoaringBitmap> for RoaringBitmap
sourcefn bitor_assign(&mut self, rhs: RoaringBitmap)
fn bitor_assign(&mut self, rhs: RoaringBitmap)
An union
between two sets.
sourceimpl BitXor<&RoaringBitmap> for &RoaringBitmap
impl BitXor<&RoaringBitmap> for &RoaringBitmap
sourcefn bitxor(self, rhs: &RoaringBitmap) -> RoaringBitmap
fn bitxor(self, rhs: &RoaringBitmap) -> RoaringBitmap
A symmetric difference
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the ^
operator.
sourceimpl BitXor<&RoaringBitmap> for RoaringBitmap
impl BitXor<&RoaringBitmap> for RoaringBitmap
sourcefn bitxor(self, rhs: &RoaringBitmap) -> RoaringBitmap
fn bitxor(self, rhs: &RoaringBitmap) -> RoaringBitmap
A symmetric difference
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the ^
operator.
sourceimpl BitXor<RoaringBitmap> for &RoaringBitmap
impl BitXor<RoaringBitmap> for &RoaringBitmap
sourcefn bitxor(self, rhs: RoaringBitmap) -> RoaringBitmap
fn bitxor(self, rhs: RoaringBitmap) -> RoaringBitmap
A symmetric difference
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the ^
operator.
sourceimpl BitXor<RoaringBitmap> for RoaringBitmap
impl BitXor<RoaringBitmap> for RoaringBitmap
sourcefn bitxor(self, rhs: RoaringBitmap) -> RoaringBitmap
fn bitxor(self, rhs: RoaringBitmap) -> RoaringBitmap
A symmetric difference
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the ^
operator.
sourceimpl BitXorAssign<&RoaringBitmap> for RoaringBitmap
impl BitXorAssign<&RoaringBitmap> for RoaringBitmap
sourcefn bitxor_assign(&mut self, rhs: &RoaringBitmap)
fn bitxor_assign(&mut self, rhs: &RoaringBitmap)
A symmetric difference
between two sets.
sourceimpl BitXorAssign<RoaringBitmap> for RoaringBitmap
impl BitXorAssign<RoaringBitmap> for RoaringBitmap
sourcefn bitxor_assign(&mut self, rhs: RoaringBitmap)
fn bitxor_assign(&mut self, rhs: RoaringBitmap)
A symmetric difference
between two sets.
sourceimpl Clone for RoaringBitmap
impl Clone for RoaringBitmap
sourceimpl Debug for RoaringBitmap
impl Debug for RoaringBitmap
sourceimpl Default for RoaringBitmap
impl Default for RoaringBitmap
sourcefn default() -> RoaringBitmap
fn default() -> RoaringBitmap
Returns the “default value” for a type. Read more
sourceimpl<'a> Extend<&'a u32> for RoaringBitmap
impl<'a> Extend<&'a u32> for RoaringBitmap
sourcefn extend<I: IntoIterator<Item = &'a u32>>(&mut self, iterator: I)
fn extend<I: IntoIterator<Item = &'a u32>>(&mut self, iterator: I)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl Extend<u32> for RoaringBitmap
impl Extend<u32> for RoaringBitmap
sourcefn extend<I: IntoIterator<Item = u32>>(&mut self, iterator: I)
fn extend<I: IntoIterator<Item = u32>>(&mut self, iterator: I)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl<'a> FromIterator<&'a u32> for RoaringBitmap
impl<'a> FromIterator<&'a u32> for RoaringBitmap
sourcefn from_iter<I: IntoIterator<Item = &'a u32>>(iterator: I) -> RoaringBitmap
fn from_iter<I: IntoIterator<Item = &'a u32>>(iterator: I) -> RoaringBitmap
Creates a value from an iterator. Read more
sourceimpl FromIterator<u32> for RoaringBitmap
impl FromIterator<u32> for RoaringBitmap
sourcefn from_iter<I: IntoIterator<Item = u32>>(iterator: I) -> RoaringBitmap
fn from_iter<I: IntoIterator<Item = u32>>(iterator: I) -> RoaringBitmap
Creates a value from an iterator. Read more
sourceimpl<'a> IntoIterator for &'a RoaringBitmap
impl<'a> IntoIterator for &'a RoaringBitmap
sourceimpl IntoIterator for RoaringBitmap
impl IntoIterator for RoaringBitmap
sourceimpl<'a, I> MultiOps<&'a RoaringBitmap> for Iwhere
I: IntoIterator<Item = &'a RoaringBitmap>,
impl<'a, I> MultiOps<&'a RoaringBitmap> for Iwhere
I: IntoIterator<Item = &'a RoaringBitmap>,
type Output = RoaringBitmap
type Output = RoaringBitmap
The type of output from operations.
sourcefn intersection(self) -> Self::Output
fn intersection(self) -> Self::Output
The intersection
between all elements.
sourcefn difference(self) -> Self::Output
fn difference(self) -> Self::Output
The difference
between all elements.
sourcefn symmetric_difference(self) -> Self::Output
fn symmetric_difference(self) -> Self::Output
The symmetric difference
between all elements.
sourceimpl<I> MultiOps<RoaringBitmap> for Iwhere
I: IntoIterator<Item = RoaringBitmap>,
impl<I> MultiOps<RoaringBitmap> for Iwhere
I: IntoIterator<Item = RoaringBitmap>,
type Output = RoaringBitmap
type Output = RoaringBitmap
The type of output from operations.
sourcefn intersection(self) -> Self::Output
fn intersection(self) -> Self::Output
The intersection
between all elements.
sourcefn difference(self) -> Self::Output
fn difference(self) -> Self::Output
The difference
between all elements.
sourcefn symmetric_difference(self) -> Self::Output
fn symmetric_difference(self) -> Self::Output
The symmetric difference
between all elements.
sourceimpl PartialEq<RoaringBitmap> for RoaringBitmap
impl PartialEq<RoaringBitmap> for RoaringBitmap
sourcefn eq(&self, other: &RoaringBitmap) -> bool
fn eq(&self, other: &RoaringBitmap) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Sub<&RoaringBitmap> for &RoaringBitmap
impl Sub<&RoaringBitmap> for &RoaringBitmap
sourcefn sub(self, rhs: &RoaringBitmap) -> RoaringBitmap
fn sub(self, rhs: &RoaringBitmap) -> RoaringBitmap
A difference
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the -
operator.
sourceimpl Sub<&RoaringBitmap> for RoaringBitmap
impl Sub<&RoaringBitmap> for RoaringBitmap
sourcefn sub(self, rhs: &RoaringBitmap) -> RoaringBitmap
fn sub(self, rhs: &RoaringBitmap) -> RoaringBitmap
A difference
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the -
operator.
sourceimpl Sub<RoaringBitmap> for &RoaringBitmap
impl Sub<RoaringBitmap> for &RoaringBitmap
sourcefn sub(self, rhs: RoaringBitmap) -> RoaringBitmap
fn sub(self, rhs: RoaringBitmap) -> RoaringBitmap
A difference
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the -
operator.
sourceimpl Sub<RoaringBitmap> for RoaringBitmap
impl Sub<RoaringBitmap> for RoaringBitmap
sourcefn sub(self, rhs: RoaringBitmap) -> RoaringBitmap
fn sub(self, rhs: RoaringBitmap) -> RoaringBitmap
A difference
between two sets.
type Output = RoaringBitmap
type Output = RoaringBitmap
The resulting type after applying the -
operator.
sourceimpl SubAssign<&RoaringBitmap> for RoaringBitmap
impl SubAssign<&RoaringBitmap> for RoaringBitmap
sourcefn sub_assign(&mut self, rhs: &RoaringBitmap)
fn sub_assign(&mut self, rhs: &RoaringBitmap)
A difference
between two sets.
sourceimpl SubAssign<RoaringBitmap> for RoaringBitmap
impl SubAssign<RoaringBitmap> for RoaringBitmap
sourcefn sub_assign(&mut self, rhs: RoaringBitmap)
fn sub_assign(&mut self, rhs: RoaringBitmap)
A difference
between two sets.
impl StructuralPartialEq for RoaringBitmap
Auto Trait Implementations
impl RefUnwindSafe for RoaringBitmap
impl Send for RoaringBitmap
impl Sync for RoaringBitmap
impl Unpin for RoaringBitmap
impl UnwindSafe for RoaringBitmap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more