commit | 848421d1f0850cb5abfea84f21bde96c416f07e4 | [log] [tgz] |
---|---|---|
author | Andrew Walbran <[email protected]> | Fri May 12 14:05:05 2023 +0000 |
committer | Andrew Walbran <[email protected]> | Fri May 12 14:52:23 2023 +0000 |
tree | d878ed1bb3d1ad0cf168026f2aa8104f3ddb4ced | |
parent | 275646277700efc41ab7e914810b53d65fd0e1a7 [diff] |
Use new no-std flag to cargo2android. Bug: 279614907 Test: Ran cargo2android and compared Android.bp Change-Id: Iacf967b528194b74d99bdcbc05f11cdb2da82281
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