forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: transmute: Add implementation for FromBytes trait
Add implementation and documentation for FromBytes trait. Add new feature block in order to allow using ToBytes and bound to from_bytes_mut function. I'm adding this feature because is possible create a value with disallowed bit pattern and as_byte_mut could create such value by mutating the array and acessing the original value. So adding ToBytes this can be avoided. Link: Rust-for-Linux#1119 Signed-off-by: Christian dos Santos de Lima <[email protected]>
- Loading branch information
1 parent
ce1c54f
commit 052dca5
Showing
2 changed files
with
88 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters