pub trait MutableMapKey<'a>:
Clone
+ Eq
+ Hash {
// Required methods
fn decode_key(field: FieldView<'a>) -> Option<Self>;
fn detect_key(field: FieldView<'a>) -> Option<&'a [u32]>;
fn encode_key(&self, buffer: &mut Buffer) -> Result<Unit, MutableError>;
fn key_kind() -> MutableMapKeyKind;
fn write_key_bytes<'b>(&'b self, scratch: &'b mut [u8; 8]) -> &'b [u8] ⓘ;
// Provided method
fn borrowed_key_bytes(&self) -> Option<&[u8]> { ... }
}Expand description
Map-key encoding contract used by MutableMap.
Required Methods§
fn decode_key(field: FieldView<'a>) -> Option<Self>
fn detect_key(field: FieldView<'a>) -> Option<&'a [u32]>
fn encode_key(&self, buffer: &mut Buffer) -> Result<Unit, MutableError>
fn key_kind() -> MutableMapKeyKind
fn write_key_bytes<'b>(&'b self, scratch: &'b mut [u8; 8]) -> &'b [u8] ⓘ
Provided Methods§
fn borrowed_key_bytes(&self) -> Option<&[u8]>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".