Skip to main content

ZeroCopyType

Trait ZeroCopyType 

Source
pub trait ZeroCopyType<E: Endian = NativeEndian>: ZeroCopy {
    type Builder;
}
Available on crate feature zero-copy only.
Expand description

A trait for zero-copy types that defines their preferred builder type.

Required Associated Types§

Source

type Builder

The builder type associated with this trait.

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.

Implementations on Foreign Types§

Source§

impl<E: Endian> ZeroCopyType<E> for bool

Source§

type Builder = bool

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for char

Source§

type Builder = char

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for f32

Source§

type Builder = f32

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for f64

Source§

type Builder = f64

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for i8

Source§

type Builder = i8

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for i16

Source§

type Builder = i16

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for i32

Source§

type Builder = i32

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for i64

Source§

type Builder = i64

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for i128

Source§

type Builder = i128

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for u8

Source§

type Builder = u8

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for u16

Source§

type Builder = u16

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for u32

Source§

type Builder = u32

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for u64

Source§

type Builder = u64

The builder type associated with this trait.

Source§

impl<E: Endian> ZeroCopyType<E> for u128

Source§

type Builder = u128

The builder type associated with this trait.

Source§

impl<E: Endian, T, const N: usize> ZeroCopyType<E> for [T; N]
where T: ZeroCopy + ZeroCopyType<E>,

Source§

type Builder = [<T as ZeroCopyType<E>>::Builder; N]

The builder type associated with this trait.

Implementors§

Source§

impl<E: Endian> ZeroCopyType<E> for ZeroStr<E>

Available on crate feature alloc only.
Source§

impl<E: Endian, T, const ALIGN: usize> ZeroCopyType<E> for RelativePtr<T, ALIGN, E>
where T: ZeroCopy + ZeroCopyType<E>,

Available on crate feature alloc only.
Source§

type Builder = RelativeBuilder<<T as ZeroCopyType<E>>::Builder, ALIGN>

Source§

impl<E: Endian, T, const ALIGN: usize> ZeroCopyType<E> for ZeroSlice<T, ALIGN, E>
where T: ZeroCopy + ZeroCopyType<E>,

Available on crate feature alloc only.
Source§

type Builder = SliceBuilder<<T as ZeroCopyType<E>>::Builder, ALIGN>

Source§

impl<E: Endian, T, const N: usize, const ALIGN: usize> ZeroCopyType<E> for ZeroArray<T, N, ALIGN, E>
where T: ZeroCopy + ZeroCopyType<E>,

Available on crate feature alloc only.
Source§

type Builder = ArrayBuilder<<T as ZeroCopyType<E>>::Builder, N, ALIGN>

Source§

impl<E: Endian, const CAP: usize> ZeroCopyType<E> for ZeroString<CAP, E>

Available on crate feature alloc only.
Source§

type Builder = FixedString<CAP>