v0.1.1: Derive Macros + Documentation Improvements
Thanks goes to @ModProg for his contributions on the new derive macros!
This release contains no breaking changes.
Added
-
SchemaName:private
andCollectionName::private
are two new constructors
that allow defining names without specifying an authority. Developers
creating reusable collections and/or schemas should not use these methods as
namespacing is meant to help prevent name collisions. -
connection::Collection::all()
andSchemaCollection::all()
have been
implemented as simple wrappers aroundlist(..)
. -
#146, #187: The
Schema
,Collection
, andView
traits can
now be derived rather than manually implemented:#[derive(Debug, Schema)] #[schema(name = "my-schema", collections = [Shape])] struct MySchema; #[derive(Debug, Serialize, Deserialize, Collection)] #[collection(name = "shapes", views = [ShapesByNumberOfSides])] struct Shape { pub sides: u32, } #[derive(Debug, Clone, View)] #[view(collection = Shape, key = u32, value = usize, name = "by-number-of-sides")] struct ShapesByNumberOfSides;
-
#169: Memory-only instances of Storage can be created now. This is primarily intended for testing purposes.
Changed
- Inline examples have been added for every
connection::Collection
and
connection::View
function. - All examples have been updated to the new derive macro syntax. Additionally,
documentation and examples for deriving Schema, Collection, and View have been
added to the respective traits.