Trait radarbase::types::RadbKey

source ·
pub trait RadbKey {
    type View: for<'a> WithLifetime<'a>;

    // Required methods
    fn from_bytes(data: &[u8]) -> <Self::View as WithLifetime<'_>>::Out;
    fn as_bytes(&self) -> &[u8] ;
    fn compare(data1: &[u8], data2: &[u8]) -> Ordering;
}

Required Associated Types§

source

type View: for<'a> WithLifetime<'a>

Required Methods§

source

fn from_bytes(data: &[u8]) -> <Self::View as WithLifetime<'_>>::Out

Deserializes data Implementations may return a view over data, or an owned type

source

fn as_bytes(&self) -> &[u8]

Serialize the key to a slice

source

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl RadbKey for [u8]

§

type View = RefLifetime<[u8]>

source§

fn from_bytes(data: &[u8]) -> <Self::View as WithLifetime<'_>>::Out

source§

fn as_bytes(&self) -> &[u8]

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Implementors§