Type Alias BlockNumberList

pub type BlockNumberList = IntegerList;
Available on crate feature provider only.
Expand description

List with transaction numbers.

Aliased Type§

struct BlockNumberList(pub RoaringTreemap);

Fields§

§0: RoaringTreemap

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes

Implementations

§

impl IntegerList

pub fn empty() -> IntegerList

Creates a new empty IntegerList.

pub fn new( list: impl IntoIterator<Item = u64>, ) -> Result<IntegerList, IntegerListError>

Creates an IntegerList from a list of integers.

Returns an error if the list is not pre-sorted.

pub fn new_pre_sorted(list: impl IntoIterator<Item = u64>) -> IntegerList

Creates an IntegerList from a pre-sorted list of integers.

§Panics

Panics if the list is not pre-sorted.

pub fn append( &mut self, list: impl IntoIterator<Item = u64>, ) -> Result<u64, IntegerListError>

Appends a list of integers to the current list.

pub fn push(&mut self, value: u64) -> Result<(), IntegerListError>

Pushes a new integer to the list.

pub fn clear(&mut self)

Clears the list.

pub fn to_bytes(&self) -> Vec<u8>

Serializes a IntegerList into a sequence of bytes.

pub fn to_mut_bytes<B>(&self, buf: &mut B)
where B: BufMut,

Serializes a IntegerList into a sequence of bytes.

pub fn from_bytes(data: &[u8]) -> Result<IntegerList, IntegerListError>

Deserializes a sequence of bytes into a proper IntegerList.

Trait Implementations

§

impl<'a> Arbitrary<'a> for IntegerList

Available on crate feature arbitrary only.
§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<IntegerList, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
§

fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
§

impl Clone for IntegerList

§

fn clone(&self) -> IntegerList

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Compress for IntegerList

§

type Compressed = Vec<u8>

Compressed type.
§

fn compress(self) -> <IntegerList as Compress>::Compressed

Compresses data going into the database.
§

fn compress_to_buf<B>(&self, buf: &mut B)
where B: BufMut + AsMut<[u8]>,

Compresses data to a given buffer.
§

fn uncompressable_ref(&self) -> Option<&[u8]>

If the type cannot be compressed, return its inner reference as Some(self.as_ref())
§

impl Debug for IntegerList

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Decompress for IntegerList

§

fn decompress(value: &[u8]) -> Result<IntegerList, DatabaseError>

Decompresses data coming from the database.
§

fn decompress_owned(value: Vec<u8>) -> Result<Self, DatabaseError>

Decompresses owned data coming from the database.
§

impl Default for IntegerList

§

fn default() -> IntegerList

Returns the “default value” for a type. Read more
§

impl Deref for IntegerList

§

type Target = RoaringTreemap

The resulting type after dereferencing.
§

fn deref(&self) -> &<IntegerList as Deref>::Target

Dereferences the value.
§

impl<'de> Deserialize<'de> for IntegerList

§

fn deserialize<D>( deserializer: D, ) -> Result<IntegerList, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<IntegerListInput> for IntegerList

§

fn from(list: IntegerListInput) -> IntegerList

Converts to this type from the input type.
§

impl PartialEq for IntegerList

§

fn eq(&self, other: &IntegerList) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Serialize for IntegerList

§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl StructuralPartialEq for IntegerList