Trait wiggle::GuestTypeTransparent
source · [−]pub unsafe trait GuestTypeTransparent<'a>: GuestType<'a> {
fn validate(ptr: *mut Self) -> Result<(), GuestError>;
}
Expand description
A trait for GuestType
s 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 implemengation ensures that the GuestPtr::as_slice methods are safe. This trait should only ever be implemented by wiggle_generate-produced code.