Add implementation and documentation for FromBytes trait....
Add new feature block in order to allow using ToBytes
and bound to from_bytes_mut function.
Link: https://github.com/Rust-for-Linux/linux/issues/1119
Signed-off-by: Christian dos Santos de Lima <christiansantoslima21@xxxxxxxxx>
---
rust/kernel/lib.rs | 2 +
rust/kernel/transmute.rs | 302 +++++++++++++++++++++++++++++++++++++--
2 files changed, 290 insertions(+), 14 deletions(-)
--- a/rust/kernel/transmute.rs...
+++ b/rust/kernel/transmute.rs
+unsafe impl FromBytes for u8 {...
+unsafe impl FromBytes for u16 {...
+unsafe impl FromBytes for u32 {...
+unsafe impl FromBytes for u64 {...
+unsafe impl FromBytes for usize {...
+unsafe impl FromBytes for i8 {...
+unsafe impl FromBytes for i16 {...
+unsafe impl FromBytes for i32 {...
+unsafe impl FromBytes for i64 {...
+unsafe impl FromBytes for isize {...