[−][src]Trait gut::mesh::attrib::Bytes
Helper trait to interpret a slice of bytes representing a sized type. Note: this trait is meant to be used transiently on the same platform, and so doesn't care about endianness. In other words, the slice of bytes generated by this trait should not be stored anywhere that outlives the lifetime of the program.
Provided methods
fn as_bytes(&self) -> &[u8]
Get a slice of bytes representing Self
.
fn interpret_bytes(bytes: &[u8]) -> &Self
Panics if the size of the given bytes slice is not equal to the size of Self
.