Trait ElementType

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

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

Required Methods§

Source

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

Source

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

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 + Copy + Debug + Unpin + Send + Sync + Encode + Decode<()>,

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