pub trait Std140: Copy {
type Encoded: Copy;
// Required methods
fn std140_encode(self) -> Self::Encoded;
fn std140_decode(encoded: Self::Encoded) -> Self;
}Expand description
Types that have a std140 representation.
This trait allows to encode types into their std140 representation but also decode such representation into the
proper type.
Required Associated Types§
Required Methods§
Sourcefn std140_encode(self) -> Self::Encoded
fn std140_encode(self) -> Self::Encoded
Encode the value into its std140 representation.
Sourcefn std140_decode(encoded: Self::Encoded) -> Self
fn std140_decode(encoded: Self::Encoded) -> Self
Decode a value from its std140 representation.
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.