Cargo Format

This commit is contained in:
Richard Bradfield 2020-06-02 12:17:59 +01:00
parent 2c5dadba8d
commit 808bc022f3
No known key found for this signature in database
GPG key ID: 0A10CE15CBC4A23F
4 changed files with 60 additions and 59 deletions

View file

@ -133,49 +133,49 @@ macro_rules! private_define_interface {
/// Define a new interface. Used at any layer of your application
/// to declare what dependencies are required by that part of the
/// program.
///
///
/// Interfaces follow a trait-like syntax, except that they may
/// only contain "getter" methods of a particular form. The names
/// of these methods are for the most part unimportant, but the
/// return types are used to identify dependencies required for
/// a context to implement this interface.
///
///
/// ## Example
///
///
/// ```
/// use std::sync::Arc;
///
///
/// #[derive(Debug)]
/// struct Foo;
///
///
/// aerosol::define_interface!(
/// TestInterface {
/// fn foo(&self) -> Arc<Foo>;
/// }
/// );
/// ```
///
///
/// Interfaces may also specify super-traits, which can themselves
/// be interfaces. Interfaces do not need to explicitly list
/// dependencies if they are transitively required by one of their
/// super-traits, but repeating a dependency will still only
/// require it to be provided once.
///
///
/// ## Example
///
///
/// ```
/// #![recursion_limit="128"]
/// use std::sync::Arc;
///
///
/// #[derive(Debug)]
/// struct Foo;
///
///
/// aerosol::define_interface!(
/// FooInterface {
/// fn foo(&self) -> Arc<Foo>;
/// }
/// );
///
///
/// aerosol::define_interface!(
/// TestInterface: FooInterface + Clone {}
/// );