pub trait RankArray {
// Required methods
fn build(count_ranks: Vec<usize>) -> Box<Self>;
fn serialize_into<W: Write>(&self, writer: W) -> Result<usize>;
fn deserialize_from<R: Read>(reader: R) -> Result<Box<Self>>;
fn size_in_bytes(&self) -> usize;
fn memory_statistics(&self) -> Value;
fn get(&self, i: usize) -> usize;
fn len(&self) -> usize;
fn is_empty(&self) -> bool;
}
Expand description
Trait for a data structure for storing count ranks.
Required Methods§
Sourcefn build(count_ranks: Vec<usize>) -> Box<Self>
fn build(count_ranks: Vec<usize>) -> Box<Self>
Builds a RankArray
from a sequence of count ranks.
Sourcefn serialize_into<W: Write>(&self, writer: W) -> Result<usize>
fn serialize_into<W: Write>(&self, writer: W) -> Result<usize>
Serializes the data structure into the writer.
Sourcefn deserialize_from<R: Read>(reader: R) -> Result<Box<Self>>
fn deserialize_from<R: Read>(reader: R) -> Result<Box<Self>>
Deserializes the data structure from the reader.
Sourcefn size_in_bytes(&self) -> usize
fn size_in_bytes(&self) -> usize
Gets the number of bytes to serialize the data structure.
Sourcefn memory_statistics(&self) -> Value
fn memory_statistics(&self) -> Value
Gets breakdowns of memory usages for components.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.