pub trait ResourceCollection<T>: Send + Sync {
type Item: Serialize;
// Required method
fn collect(&self, items: Vec<T>) -> Vec<Self::Item>;
// Provided methods
fn with(&self) -> HashMap<String, Value> { ... }
fn meta(&self) -> HashMap<String, Value> { ... }
}
Expand description
Trait for resource collections