Trait zerovec::maps::ZeroMapKV

source ·
pub trait ZeroMapKV<'a> {
    type Container: MutableZeroVecLike<'a, Self, SliceVariant = Self::Slice, GetType = Self::GetType, OwnedType = Self::OwnedType> + Sized;
    type Slice: ZeroVecLike<Self, GetType = Self::GetType> + ?Sized;
    type GetType: ?Sized + 'static;
    type OwnedType: 'static;
}
Expand description

Trait marking types which are allowed to be keys or values in ZeroMap.

Users should not be calling methods of this trait directly, however if you are implementing your own AsULE or VarULE type you may wish to implement this trait.

Required Associated Types§

source

type Container: MutableZeroVecLike<'a, Self, SliceVariant = Self::Slice, GetType = Self::GetType, OwnedType = Self::OwnedType> + Sized

The container that can be used with this type: ZeroVec or VarZeroVec.

source

type Slice: ZeroVecLike<Self, GetType = Self::GetType> + ?Sized

source

type GetType: ?Sized + 'static

The type produced by Container::get()

This type will be predetermined by the choice of Self::Container: For sized types this must be T::ULE, and for unsized types this must be T

source

type OwnedType: 'static

The type produced by Container::replace() and Container::remove(), also used during deserialization. If Self is human readable serialized, deserializing to Self::OwnedType should produce the same value once passed through Self::owned_as_self()

This type will be predetermined by the choice of Self::Container: For sized types this must be T and for unsized types this must be Box<T>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a> ZeroMapKV<'a> for char

source§

impl<'a> ZeroMapKV<'a> for f32

source§

impl<'a> ZeroMapKV<'a> for f64

source§

impl<'a> ZeroMapKV<'a> for i8

§

type Container = ZeroVec<'a, i8>

§

type Slice = ZeroSlice<i8>

§

type GetType = <i8 as AsULE>::ULE

§

type OwnedType = i8

source§

impl<'a> ZeroMapKV<'a> for i16

source§

impl<'a> ZeroMapKV<'a> for i32

source§

impl<'a> ZeroMapKV<'a> for i64

source§

impl<'a> ZeroMapKV<'a> for i128

source§

impl<'a> ZeroMapKV<'a> for str

source§

impl<'a> ZeroMapKV<'a> for u8

§

type Container = ZeroVec<'a, u8>

§

type Slice = ZeroSlice<u8>

§

type GetType = <u8 as AsULE>::ULE

§

type OwnedType = u8

source§

impl<'a> ZeroMapKV<'a> for u16

source§

impl<'a> ZeroMapKV<'a> for u32

source§

impl<'a> ZeroMapKV<'a> for u64

source§

impl<'a> ZeroMapKV<'a> for u128

source§

impl<'a> ZeroMapKV<'a> for usize

source§

impl<'a, A: Ord + AsULE + 'static, B: Ord + AsULE + 'static> ZeroMapKV<'a> for (A, B)

source§

impl<'a, A: Ord + AsULE + 'static, B: Ord + AsULE + 'static, C: Ord + AsULE + 'static> ZeroMapKV<'a> for (A, B, C)

source§

impl<'a, A: Ord + AsULE + 'static, B: Ord + AsULE + 'static, C: Ord + AsULE + 'static, D: Ord + AsULE + 'static> ZeroMapKV<'a> for (A, B, C, D)

source§

impl<'a, A: Ord + AsULE + 'static, B: Ord + AsULE + 'static, C: Ord + AsULE + 'static, D: Ord + AsULE + 'static, E: Ord + AsULE + 'static> ZeroMapKV<'a> for (A, B, C, D, E)

source§

impl<'a, A: Ord + AsULE + 'static, B: Ord + AsULE + 'static, C: Ord + AsULE + 'static, D: Ord + AsULE + 'static, E: Ord + AsULE + 'static, F: Ord + AsULE + 'static> ZeroMapKV<'a> for (A, B, C, D, E, F)

source§

impl<'a, T> ZeroMapKV<'a> for Option<T>
where Option<T>: AsULE + 'static,

§

type Container = ZeroVec<'a, Option<T>>

§

type Slice = ZeroSlice<Option<T>>

§

type GetType = <Option<T> as AsULE>::ULE

§

type OwnedType = Option<T>

source§

impl<'a, T> ZeroMapKV<'a> for [T]
where T: ULE + AsULE<ULE = T>,

source§

impl<'a, T, const N: usize> ZeroMapKV<'a> for [T; N]
where T: AsULE + 'static,

Implementors§