commit | 322bf325776d91f5500bd236f345d08db6017b2c | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 25 07:52:08 2022 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 25 07:52:08 2022 +0000 |
tree | b8ff784236e9362417d589fc29255e139a6028d9 | |
parent | 014478fb69e2d91f288530fb30e681f53a7cd246 [diff] | |
parent | 9bed6e7426d77de73c08947abd2d59aba315862d [diff] |
Snap for 8992082 from 9bed6e7426d77de73c08947abd2d59aba315862d to gki13-boot-release Change-Id: Ie1c6f1f155f6468a1cc514b4d58b33dfb3617cc9
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