Trait gut::mesh::attrib::Bytes [−][src]
pub trait Bytes {
fn as_bytes(&self) -> &[u8]ⓘ { ... }
fn interpret_bytes(bytes: &[u8]) -> &Self { ... }
}
Expand description
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
Get a slice of bytes representing Self
.