wiggle

Trait GuestTypeTransparent

Source
pub unsafe trait GuestTypeTransparent: GuestType { }
Expand description

A trait for GuestTypes that have the same representation in guest memory as in Rust. These types can be used with the GuestPtr::as_slice method to view as a slice.

Unsafe trait because a correct GuestTypeTransparent implementation ensures that the GuestPtr::as_slice methods are safe, notably that the representation on the host matches the guest and all bit patterns are valid. This trait should only ever be implemented by wiggle_generate-produced code.

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 GuestTypeTransparent for f32

Source§

impl GuestTypeTransparent for f64

Source§

impl GuestTypeTransparent for i8

Source§

impl GuestTypeTransparent for i16

Source§

impl GuestTypeTransparent for i32

Source§

impl GuestTypeTransparent for i64

Source§

impl GuestTypeTransparent for u8

Source§

impl GuestTypeTransparent for u16

Source§

impl GuestTypeTransparent for u32

Source§

impl GuestTypeTransparent for u64

Implementors§