pub trait Collatable {
// Required methods
fn to_bytes(&self) -> Vec<u8> ⓘ;
fn successor_bytes(&self) -> Option<Vec<u8>>;
fn predecessor_bytes(&self) -> Option<Vec<u8>>;
fn is_minimum(&self) -> bool;
fn is_maximum(&self) -> bool;
// Provided methods
fn compare(&self, other: &Self) -> Ordering { ... }
fn is_in_range(
&self,
lower: RangeBound<&Self>,
upper: RangeBound<&Self>,
) -> bool { ... }
}Expand description
Trait for types that support collation operations
Required Methods§
Sourcefn successor_bytes(&self) -> Option<Vec<u8>>
fn successor_bytes(&self) -> Option<Vec<u8>>
Returns the immediate successor’s binary representation if one exists
Sourcefn predecessor_bytes(&self) -> Option<Vec<u8>>
fn predecessor_bytes(&self) -> Option<Vec<u8>>
Returns the immediate predecessor’s binary representation if one exists
Sourcefn is_minimum(&self) -> bool
fn is_minimum(&self) -> bool
Returns true if this value represents a minimum bound in its domain
Sourcefn is_maximum(&self) -> bool
fn is_maximum(&self) -> bool
Returns true if this value represents a maximum bound in its domain
Provided Methods§
fn is_in_range( &self, lower: RangeBound<&Self>, upper: RangeBound<&Self>, ) -> bool
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.