postcard-schema-ng 0.3.2

Reflection-like schemas for postcard types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Implementations of the [`Schema`] trait for the `heapless` crate v0.8

use crate::{schema::DataModelType, Schema};

#[cfg_attr(docsrs, doc(cfg(feature = "heapless-v0_8")))]
impl<T: Schema, const N: usize> Schema for heapless_v0_8::Vec<T, N> {
    const SCHEMA: &'static DataModelType = &DataModelType::Seq(T::SCHEMA);
}

#[cfg_attr(docsrs, doc(cfg(feature = "heapless-v0_8")))]
impl<const N: usize> Schema for heapless_v0_8::String<N> {
    const SCHEMA: &'static DataModelType = &DataModelType::String;
}