Primitive

Trait Primitive 

Source
pub trait Primitive:
    Send
    + Sync
    + Clone
    + Default
    + PartialEq
    + Eq
    + PartialOrd
    + Ord
    + Hash
    + Scalar {
    type RawType: Send + Sync + Clone;
    type RefType<'a>: Send + Copy;

    // Required methods
    fn new(val: Self::RawType) -> Self;
    fn to_owned(ref_data: Self::RefType<'_>) -> Self::RawType;
}

Required Associated Types§

Required Methods§

Source

fn new(val: Self::RawType) -> Self

Source

fn to_owned(ref_data: Self::RefType<'_>) -> Self::RawType

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§