commit | 6558c8bf17ee673ba87133be994557ec00395c89 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 05:14:48 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 05:14:48 2023 +0000 |
tree | 567bc5f6ef4c9372696cd6f45006bd082d225f96 | |
parent | 59ae8cdd5b34780f3f29b113780322e6bb0202db [diff] | |
parent | b0455fab6a97865c16ebd37aa43d51308d994d92 [diff] |
Snap for 9722771 from b0455fab6a97865c16ebd37aa43d51308d994d92 to udc-d1-release Change-Id: I50109fea4243a47780128eefe5b920b39ecf0952
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