Type Alias BlockNumberList

Source
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

Source§

impl IntegerList

Source

pub fn empty() -> IntegerList

Creates a new empty IntegerList.

Source

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.

Source

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.

Source

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

Appends a list of integers to the current list.

Source

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

Pushes a new integer to the list.

Source

pub fn clear(&mut self)

Clears the list.

Source

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

Serializes a IntegerList into a sequence of bytes.

Source

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

Serializes a IntegerList into a sequence of bytes.

Source

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

Deserializes a sequence of bytes into a proper IntegerList.

Trait Implementations

Source§

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

Available on crate feature arbitrary only.
Source§

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
Source§

impl Clone for IntegerList

Source§

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
Source§

impl Compress for IntegerList

Source§

type Compressed = Vec<u8>

Compressed type.
Source§

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

Compresses data going into the database.
Source§

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

Compresses data to a given buffer.
Source§

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

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

impl Debug for IntegerList

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Decompress for IntegerList

Source§

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

Decompresses data coming from the database.
Source§

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

Decompresses owned data coming from the database.
Source§

impl Default for IntegerList

Source§

fn default() -> IntegerList

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

impl Deref for IntegerList

Source§

type Target = RoaringTreemap

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

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

Source§

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
Source§

impl From<IntegerListInput> for IntegerList

Source§

fn from(list: IntegerListInput) -> IntegerList

Converts to this type from the input type.
Source§

impl PartialEq for IntegerList

Source§

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.
Source§

impl Serialize for IntegerList

Source§

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
Source§

impl StructuralPartialEq for IntegerList