Type Alias BlockNumberList
pub type BlockNumberList = IntegerList;
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
impl IntegerList
pub fn empty() -> IntegerList
pub fn empty() -> IntegerList
Creates a new empty IntegerList
.
pub fn new(
list: impl IntoIterator<Item = u64>,
) -> Result<IntegerList, IntegerListError>
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
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>
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>
pub fn push(&mut self, value: u64) -> Result<(), IntegerListError>
Pushes a new integer to the list.
pub fn clear(&mut self)
pub fn clear(&mut self)
Clears the list.
pub fn to_bytes(&self) -> Vec<u8> ⓘ
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,
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>
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.
impl<'a> Arbitrary<'a> for IntegerList
arbitrary
only.§fn arbitrary(u: &mut Unstructured<'a>) -> Result<IntegerList, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<IntegerList, Error>
Self
from the given unstructured data. Read more§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read more§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read more§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read more§impl Clone for IntegerList
impl Clone for IntegerList
§fn clone(&self) -> IntegerList
fn clone(&self) -> IntegerList
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Compress for IntegerList
impl Compress for IntegerList
§type Compressed = Vec<u8>
type Compressed = Vec<u8>
§fn compress(self) -> <IntegerList as Compress>::Compressed
fn compress(self) -> <IntegerList as Compress>::Compressed
§fn compress_to_buf<B>(&self, buf: &mut B)
fn compress_to_buf<B>(&self, buf: &mut B)
§fn uncompressable_ref(&self) -> Option<&[u8]>
fn uncompressable_ref(&self) -> Option<&[u8]>
Some(self.as_ref())