pub trait AnyVec: Send + Sync {
// Required methods
fn version(&self) -> Version;
fn name(&self) -> &str;
fn len(&self) -> usize;
fn index_type_to_string(&self) -> &'static str;
fn region_names(&self) -> Vec<String>;
fn value_type_to_size_of(&self) -> usize;
fn value_type_to_string(&self) -> &'static str;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn region_name(&self) -> String { ... }
fn etag(&self, stamp: Stamp, to: Option<i64>) -> String { ... }
fn i64_to_usize(&self, i: i64) -> usize { ... }
}Expand description
Common trait for all vectors providing metadata and utility methods.
Required Methods§
fn version(&self) -> Version
fn name(&self) -> &str
fn len(&self) -> usize
Sourcefn index_type_to_string(&self) -> &'static str
fn index_type_to_string(&self) -> &'static str
Returns the string representation of the index type.
Sourcefn region_names(&self) -> Vec<String>
fn region_names(&self) -> Vec<String>
Returns the list of region names used by this vector.
Sourcefn value_type_to_size_of(&self) -> usize
fn value_type_to_size_of(&self) -> usize
Returns the size in bytes of the value type.
Sourcefn value_type_to_string(&self) -> &'static str
fn value_type_to_string(&self) -> &'static str
Returns the short type name of the value type (e.g., “Sats”, “StoredF64”).
Provided Methods§
fn is_empty(&self) -> bool
Sourcefn region_name(&self) -> String
fn region_name(&self) -> String
Returns the combined name of the vector.
Sourcefn etag(&self, stamp: Stamp, to: Option<i64>) -> String
fn etag(&self, stamp: Stamp, to: Option<i64>) -> String
Generates an ETag for this vector based on stamp and optional end index.
Sourcefn i64_to_usize(&self, i: i64) -> usize
fn i64_to_usize(&self, i: i64) -> usize
Converts an i64 index to usize, supporting negative indexing (Python-style).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".