intrepid_model/lib.rs
1#![deny(missing_docs, rust_2018_idioms, nonstandard_style, future_incompatible)]
2#![doc = include_str!("README.md")]
3
4mod caches;
5mod events;
6mod subscriptions;
7
8pub use caches::*;
9pub use events::*;
10pub use subscriptions::*;
11
12/// An intrepid repository combines the functionality of a cache and an event repo,
13/// and is automatically implemented for any type that implements both.
14///
15/// This lets you establish an interface that expects both types, and then use any
16/// type that implements both without having to specify both types every time.
17pub trait IntrepidRepo: CacheRepo + EventRepo {}
18
19impl<T> IntrepidRepo for T where T: CacheRepo + EventRepo {}