commit | 4f96f6bc5d93dc07108046588a7e12b22d692983 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sat May 11 01:11:52 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sat May 11 01:11:52 2024 +0000 |
tree | 6da2edb7fec28257433f21c4bc0b564bee18aecd | |
parent | ad4706af5ffd71574924647eb226f33451713fb9 [diff] | |
parent | 29d6a32571a65dfb78a8db4a41effd7851003ff5 [diff] |
Snap for 11828632 from 29d6a32571a65dfb78a8db4a41effd7851003ff5 to 24Q3-release Change-Id: I09a7c8557db79f3fa68dbbe8a387eaae9e03ab88
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