commit | ed07d2321385ebae44f64e3abfdaa31456e1a563 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu May 11 23:14:53 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu May 11 23:14:53 2023 +0000 |
tree | 31ad1d3e82d4db3b019aa81fa63e3c71786ca8e7 | |
parent | 6558c8bf17ee673ba87133be994557ec00395c89 [diff] | |
parent | 9d502a82463a3db109a0cca07ecc83cb4afe3051 [diff] |
Snap for 10117275 from 9d502a82463a3db109a0cca07ecc83cb4afe3051 to udc-d1-release Change-Id: I16dc9b4e26971d62647f29c8487503bcbd9ef96c
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