commit | 275646277700efc41ab7e914810b53d65fd0e1a7 | [log] [tgz] |
---|---|---|
author | Alan Stokes <[email protected]> | Tue May 02 10:06:50 2023 +0100 |
committer | Alan Stokes <[email protected]> | Tue May 02 10:06:50 2023 +0100 |
tree | 31ad1d3e82d4db3b019aa81fa63e3c71786ca8e7 | |
parent | 6cb80b001e92d1ce3be758caa43a9db787070562 [diff] |
Add alloc to ciborium-io no_std This makes the interface for serialization more convenient. (Note that the main module, ciborium, already has an alloc dependency via half and serde.) Bug: 266172411 Test: Builds Change-Id: Ia684b7dd3a18d6f77a5db02f68f4e1c67046c740
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