commit | 6f333629bf90925556e9286bd3ca5b14036ab4aa | [log] [tgz] |
---|---|---|
author | Andrei Homescu <[email protected]> | Tue Oct 17 05:19:20 2023 +0000 |
committer | Andrei Homescu <[email protected]> | Tue Oct 17 05:19:20 2023 +0000 |
tree | 42862a95d41484723727066fcd8dd5567412ddbb | |
parent | 203a67d1df1d8f19184d0bb2c735a51fe4c47b85 [diff] | |
parent | 63e4a8bc35b08c771b4d50311bf3516186e45e2c [diff] |
Merge remote-tracking branch 'aosp/main' into trusty-main Change-Id: Ibbf9c3eed3a27c139ad535fa1481f6b8f5686497
Simple, Low-level I/O traits
This crate provides two simple traits: Read
and Write
. These traits mimic their counterparts in std::io
, but are trimmed for simplicity and can be used in no_std
and no_alloc
environments. Since this crate contains only traits, inline functions and unit structs, it should be a zero-cost abstraction.
If the std
feature is enabled, we provide blanket implementations for all std::io
types. If the alloc
feature is enabled, we provide implementations for Vec<u8>
. In all cases, you get implementations for byte slices. You can, of course, implement the traits for your own types.
License: Apache-2.0