Trait TransparentType

pub unsafe trait TransparentType: Sized + Clone {
    type GlibType;
}
Expand description

Trait for types that have the same memory representation as their FFI type.

Values of types implementing this trait can be transmuted directly to the FFI type, references to pointers to the FFI type.

Required Associated Types§

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§

§

impl TransparentType for char

§

impl TransparentType for f32

§

impl TransparentType for f64

§

impl TransparentType for i8

§

type GlibType = i8

§

impl TransparentType for i16

§

impl TransparentType for i32

§

impl TransparentType for i64

§

impl TransparentType for u8

§

type GlibType = u8

§

impl TransparentType for u16

§

impl TransparentType for u32

§

impl TransparentType for u64

Implementors§