|0.1.3||Feb 17, 2020|
|0.1.2||Nov 23, 2019|
|0.1.0||Nov 1, 2018|
#18 in No standard library
9,224 downloads per month
Used in 364 crates (10 directly)
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
These traits are somewhat similar to the
AsMut except that they are NOT
polymorphic (no input type parameter) and their methods always return slices (
The main use case of these traits is writing generic code that accepts (fixed size) buffers. For
example, a bound
T: StableDeref + AsMutSlice<Element = u8> + 'static will accepts types like
&'static mut [u8],
&'static mut [u8; 128] and
&'static mut GenericArray<u8, U1024> -- all
of them are appropriate for DMA transfers.
This crate is guaranteed to compile on stable Rust 1.31 and up. It might compile on older versions but that may change in any new patch release.