pub unsafe trait EncodeLinkstore {
// Required method
fn as_le_bytes(&self) -> Cow<'_, [u8]>;
// Provided method
fn as_be_bytes(&self) -> Cow<'_, [u8]> { ... }
}Expand description
Implemented for types that can be encoded into a linkstore.
§Safety
Implementing this trait is extremely unsafe. The bytes will be effectively core::mem::transmuted into the type in the compiled binary, so the bytes must be valid and in the correct endianness if applicable.