mirror of
https://github.com/trussed-dev/trussed.git
synced 2026-06-09 06:07:49 +00:00
Remove public postcard re-exports
postcard serialization is only used internally and therefore is an implementation detail that should not be part of the public API. Crates that also need postcard serialization should declare their own dependency for that.
This commit is contained in:
@@ -34,6 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Updated `littlefs2` to 0.4.0.
|
||||
- Made `Request`, `Reply`, `Error`, `Context`, `CoreContext`, `Mechanism`,
|
||||
`ui::Status` non-exhaustive.
|
||||
- Made `postcard_deserialize`, `postcard_serialize` and
|
||||
`postcard_serialize_bytes` private.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
+4
-3
@@ -48,11 +48,12 @@ pub use error::Error;
|
||||
pub use platform::Platform;
|
||||
pub use service::Service;
|
||||
|
||||
pub use cbor_smol::{cbor_deserialize, cbor_serialize, cbor_serialize_bytes};
|
||||
pub use cbor_smol::{cbor_deserialize, cbor_serialize_bytes};
|
||||
pub use heapless_bytes::Bytes;
|
||||
pub use postcard::{from_bytes as postcard_deserialize, to_slice as postcard_serialize};
|
||||
|
||||
pub fn postcard_serialize_bytes<T: serde::Serialize, const N: usize>(
|
||||
pub(crate) use postcard::from_bytes as postcard_deserialize;
|
||||
|
||||
pub(crate) fn postcard_serialize_bytes<T: serde::Serialize, const N: usize>(
|
||||
object: &T,
|
||||
) -> postcard::Result<Bytes<N>> {
|
||||
let vec = postcard::to_vec(object)?;
|
||||
|
||||
Reference in New Issue
Block a user