commit | 36410defa98d8f8e30be7fdcef4be7185122de27 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Jun 16 21:58:23 2022 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Jun 16 21:58:23 2022 +0000 |
tree | c22a2a4a3c4a824d579ddc5e319617b0e29a30bc | |
parent | 525a0dd9ae3269ccd7bd5db2a402195f67c5dd7a [diff] | |
parent | 58b10f2bcaee58bab920b55bd3393078c4caeb3f [diff] |
Snap for 8736029 from 58b10f2bcaee58bab920b55bd3393078c4caeb3f to mainline-go-permission-release Change-Id: I47c00812d95111cb98a1b7df72255e0a02f38b87
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