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
impl IntegerList
Sourcepub fn empty() -> IntegerList
pub fn empty() -> IntegerList
Creates a new empty IntegerList
.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn push(&mut self, value: u64) -> Result<(), IntegerListError>
pub fn push(&mut self, value: u64) -> Result<(), IntegerListError>
Pushes a new integer to the list.
Sourcepub 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.
Sourcepub 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
Source§impl<'a> Arbitrary<'a> for IntegerList
Available on crate feature arbitrary
only.
impl<'a> Arbitrary<'a> for IntegerList
Available on crate feature
arbitrary
only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<IntegerList, Error>
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>
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>)
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>
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 moreSource§impl Clone for IntegerList
impl Clone for IntegerList
Source§fn clone(&self) -> IntegerList
fn clone(&self) -> IntegerList
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Compress for IntegerList
impl Compress for IntegerList
Source§type Compressed = Vec<u8>
type Compressed = Vec<u8>
Compressed type.
Source§fn compress(self) -> <IntegerList as Compress>::Compressed
fn compress(self) -> <IntegerList as Compress>::Compressed
Compresses data going into the database.
Source§fn compress_to_buf<B>(&self, buf: &mut B)
fn compress_to_buf<B>(&self, buf: &mut B)
Compresses data to a given buffer.
Source§fn uncompressable_ref(&self) -> Option<&[u8]>
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
impl Debug for IntegerList
Source§impl Decompress for IntegerList
impl Decompress for IntegerList
Source§fn decompress(value: &[u8]) -> Result<IntegerList, DatabaseError>
fn decompress(value: &[u8]) -> Result<IntegerList, DatabaseError>
Decompresses data coming from the database.
Source§fn decompress_owned(value: Vec<u8>) -> Result<Self, DatabaseError>
fn decompress_owned(value: Vec<u8>) -> Result<Self, DatabaseError>
Decompresses owned data coming from the database.
Source§impl Default for IntegerList
impl Default for IntegerList
Source§fn default() -> IntegerList
fn default() -> IntegerList
Returns the “default value” for a type. Read more
Source§impl Deref for IntegerList
impl Deref for IntegerList
Source§impl<'de> Deserialize<'de> for IntegerList
impl<'de> Deserialize<'de> for IntegerList
Source§fn deserialize<D>(
deserializer: D,
) -> Result<IntegerList, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
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
impl From<IntegerListInput> for IntegerList
Source§fn from(list: IntegerListInput) -> IntegerList
fn from(list: IntegerListInput) -> IntegerList
Converts to this type from the input type.
Source§impl PartialEq for IntegerList
impl PartialEq for IntegerList
Source§impl Serialize for IntegerList
impl Serialize for IntegerList
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
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