@@ -4,25 +4,35 @@ use crate::{schema::DataModelType, Schema};
44
55extern crate alloc;
66
7+ #[ cfg_attr( docsrs, doc( cfg( any( feature = "alloc" , feature = "use-std" ) ) ) ) ]
78impl < T : Schema > Schema for alloc:: vec:: Vec < T > {
89 const SCHEMA : & ' static DataModelType = & DataModelType :: Seq ( T :: SCHEMA ) ;
910}
1011
12+ #[ cfg_attr( docsrs, doc( cfg( any( feature = "alloc" , feature = "use-std" ) ) ) ) ]
1113impl Schema for alloc:: string:: String {
1214 const SCHEMA : & ' static DataModelType = & DataModelType :: String ;
1315}
1416
17+ #[ cfg_attr( docsrs, doc( cfg( any( feature = "alloc" , feature = "use-std" ) ) ) ) ]
1518impl < K : Schema , V : Schema > Schema for alloc:: collections:: BTreeMap < K , V > {
1619 const SCHEMA : & ' static DataModelType = & DataModelType :: Map {
1720 key : K :: SCHEMA ,
1821 val : V :: SCHEMA ,
1922 } ;
2023}
2124
25+ #[ cfg_attr( docsrs, doc( cfg( any( feature = "alloc" , feature = "use-std" ) ) ) ) ]
2226impl < K : Schema > Schema for alloc:: collections:: BTreeSet < K > {
2327 const SCHEMA : & ' static DataModelType = & DataModelType :: Seq ( K :: SCHEMA ) ;
2428}
2529
30+ #[ cfg_attr( docsrs, doc( cfg( any( feature = "alloc" , feature = "use-std" ) ) ) ) ]
2631impl < T : Schema > Schema for alloc:: boxed:: Box < T > {
2732 const SCHEMA : & ' static DataModelType = T :: SCHEMA ;
2833}
34+
35+ #[ cfg_attr( docsrs, doc( cfg( any( feature = "alloc" , feature = "use-std" ) ) ) ) ]
36+ impl < T : ?Sized + Schema + alloc:: borrow:: ToOwned > Schema for alloc:: borrow:: Cow < ' _ , T > {
37+ const SCHEMA : & ' static DataModelType = T :: SCHEMA ;
38+ }
0 commit comments