pub trait RaxKey<RHS = Self>:
Clone
+ Default
+ Debug {
type Output: RaxKey;
// Required methods
fn encode(self) -> Self::Output;
fn to_buf(&self) -> (*const u8, usize);
fn from_buf(ptr: *const u8, len: usize) -> RHS;
}
Expand description
Same as RaxMap except values are not pointers to heap allocations.
Instead the “data pointer” in the RAX is the value. This means we
have sizeof
Required Associated Types§
Required Methods§
fn encode(self) -> Self::Output
fn to_buf(&self) -> (*const u8, usize)
fn from_buf(ptr: *const u8, len: usize) -> RHS
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.