CReprOf

Trait CReprOf 

Source
pub trait CReprOf<T>: Sized + CDrop {
    // Required method
    fn c_repr_of(input: T) -> Result<Self, CReprOfError>;
}
Expand description

Trait showing that the struct implementing it is a repr(C) compatible view of the parametrized type that can be created from an value of this type.

Required Methods§

Source

fn c_repr_of(input: T) -> Result<Self, CReprOfError>

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 CReprOf<bool> for bool

Source§

impl CReprOf<f32> for f32

Source§

impl CReprOf<f64> for f64

Source§

impl CReprOf<i8> for i8

Source§

impl CReprOf<i16> for i16

Source§

impl CReprOf<i32> for i32

Source§

impl CReprOf<i64> for i64

Source§

impl CReprOf<u8> for u8

Source§

impl CReprOf<u16> for u16

Source§

impl CReprOf<u32> for u32

Source§

impl CReprOf<u64> for u64

Source§

impl CReprOf<usize> for i32

Source§

impl CReprOf<usize> for usize

Source§

impl CReprOf<String> for CString

Source§

impl<U, T: CReprOf<U>, const N: usize> CReprOf<[U; N]> for [T; N]
where [T; N]: CDrop,

Implementors§

Source§

impl CReprOf<Vec<String>> for CStringArray

Source§

impl<U: CReprOf<V> + CDrop, V: 'static> CReprOf<Vec<V>> for CArray<U>

Source§

impl<U: CReprOf<V> + CDrop, V: PartialOrd + PartialEq> CReprOf<Range<V>> for CRange<U>