pub trait BlockType: Clone + Copy {
// Required methods
unsafe fn read_from_ptr(ptr: *const Self) -> Self;
unsafe fn write_to_ptr(self, ptr: *mut Self);
fn xor_with(&mut self, other: Self);
}
Expand description
A trait for block types
Required Methods§
Sourceunsafe fn read_from_ptr(ptr: *const Self) -> Self
unsafe fn read_from_ptr(ptr: *const Self) -> Self
Read a block from a pointer
Sourceunsafe fn write_to_ptr(self, ptr: *mut Self)
unsafe fn write_to_ptr(self, ptr: *mut Self)
Write a block to a pointer
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.