commit | b1d771a800fecbbb3e9ceb15ba4aa39e6e4bcda0 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Tue Aug 20 17:55:58 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Tue Aug 20 17:55:58 2024 +0000 |
tree | a31c71ec7f3fcc145934db6dc3189a605071b594 | |
parent | 75c89969314a00cbb25be1bb250f5554aae9d626 [diff] | |
parent | eafbe659e7a105cecdde4f43b19dc9ccff6a6737 [diff] |
Snap for 12252487 from eafbe659e7a105cecdde4f43b19dc9ccff6a6737 to simpleperf-release Change-Id: Ieb09078833e11db56ad27961456e1d86c8e4e1e6
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