Trait ElementType

Source
pub trait ElementType:
    Default
    + Sized
    + Copy
    + Debug
    + Unpin
    + Send
    + Sync {
    // Required methods
    fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), EncodeError>;
    fn decode<D: Decoder<Context = ()>>(
        decoder: &mut D,
    ) -> Result<Self, DecodeError>;
}
Expand description

Basic Type that can be used in a buffer in a CuPool.

Required Methods§

Source

fn encode<E: Encoder>(&self, encoder: &mut E) -> Result<(), EncodeError>

Source

fn decode<D: Decoder<Context = ()>>( decoder: &mut D, ) -> Result<Self, DecodeError>

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.

Implementors§

Source§

impl<T> ElementType for T
where T: Default + Sized + Copy + Debug + Unpin + Send + Sync + Encode + Decode<()>,

Blanket implementation for all types that are Sized, Copy, Encode, Decode and Debug.