#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(feature = "simd", feature(portable_simd))]
#![warn(missing_docs)]
#![warn(unsafe_op_in_unsafe_fn)]
#![warn(variant_size_differences)]
#![allow(unknown_lints)]
#[cfg(feature = "std")]
extern crate byteorder;
#[macro_use]
extern crate alloc;
use core::fmt;
pub mod bitmap;
pub mod treemap;
pub use bitmap::RoaringBitmap;
pub use treemap::RoaringTreemap;
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct NonSortedIntegers {
valid_until: u64,
}
impl NonSortedIntegers {
pub fn valid_until(&self) -> u64 {
self.valid_until
}
}
impl fmt::Display for NonSortedIntegers {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "integers are ordered up to the {}th element", self.valid_until())
}
}
#[cfg(feature = "std")]
impl std::error::Error for NonSortedIntegers {}
pub trait MultiOps<T>: IntoIterator<Item = T> {
type Output;
fn union(self) -> Self::Output;
fn intersection(self) -> Self::Output;
fn difference(self) -> Self::Output;
fn symmetric_difference(self) -> Self::Output;
}