postcard_schema/impls/
heapless_v0_9.rs

1//! Implementations of the [`Schema`] trait for the `heapless` crate v0.9
2
3use crate::{
4    schema::{DataModelType, NamedType},
5    Schema,
6};
7
8#[cfg_attr(docsrs, doc(cfg(feature = "heapless-v0_9")))]
9impl<T: Schema, const N: usize> Schema for heapless_v0_9::Vec<T, N> {
10    const SCHEMA: &'static NamedType = &NamedType {
11        name: "heapless::Vec<T, N>",
12        ty: &DataModelType::Seq(T::SCHEMA),
13    };
14}
15#[cfg_attr(docsrs, doc(cfg(feature = "heapless-v0_9")))]
16impl<const N: usize> Schema for heapless_v0_9::String<N> {
17    const SCHEMA: &'static NamedType = &NamedType {
18        name: "heapless::String<N>",
19        ty: &DataModelType::String,
20    };
21}