Trait std::raw::Repr [] [src]

pub unsafe trait Repr<T> {
    fn repr(&self) -> T { ... }
Unstable (raw #27751)

This trait is meant to map equivalences between raw structs and their corresponding rust values.

Provided Methods

fn repr(&self) -> T

Unstable (raw #27751)

This function "unwraps" a rust value (without consuming it) into its raw struct representation. This can be used to read/write different values for the struct. This is a safe method because by default it does not enable write-access to the fields of the return value in safe code.