commit | 619bff77328d9413e08abf9ab999dd1b3cec218c | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Sep 10 23:08:48 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Sep 10 23:08:48 2024 +0000 |
tree | a31c71ec7f3fcc145934db6dc3189a605071b594 | |
parent | 40e5e329232fd8b7fc809504d47f752472cd6710 [diff] | |
parent | 44c49e15c76ffd5d105a3bb6cd787e3442db0221 [diff] |
Snap for 12349386 from 44c49e15c76ffd5d105a3bb6cd787e3442db0221 to sdk-release Change-Id: Ida80ae3be1e3cb3d6a018daeb5955a664a4e579b
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