commit | 116a65cb127119dcecce48b39fdc767f8d3315c3 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sat Feb 12 04:05:39 2022 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sat Feb 12 04:05:39 2022 +0000 |
tree | 922037dec6ecfe4a4cb2bf9ab0eeeb8a5b3cbc29 | |
parent | 3d0004928071790dbf36b11c3b716d2bcc8a669c [diff] | |
parent | 8d71147a9bddb9a3b86dee1ae92700323276b6b4 [diff] |
Snap for 8176975 from 8d71147a9bddb9a3b86dee1ae92700323276b6b4 to tm-release Change-Id: I70a753f16fc8f6dc82506570128f607732e599f5
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