mirror of
https://github.com/TECHNOFAB11/aerosol.git
synced 2025-12-11 23:50:07 +01:00
22 lines
389 B
Rust
22 lines
389 B
Rust
|
|
pub extern crate tt_call;
|
||
|
|
pub extern crate failure;
|
||
|
|
|
||
|
|
mod join;
|
||
|
|
mod parse;
|
||
|
|
mod interface;
|
||
|
|
mod context;
|
||
|
|
|
||
|
|
|
||
|
|
pub trait Provide<T> {
|
||
|
|
fn provide(&self) -> T;
|
||
|
|
}
|
||
|
|
|
||
|
|
pub trait Factory {
|
||
|
|
type Object;
|
||
|
|
fn build() -> Result<Self::Object, failure::Error>;
|
||
|
|
}
|
||
|
|
|
||
|
|
pub trait ProvideWith<T>: Provide<T> + Sized {
|
||
|
|
fn provide_with<E, F: FnOnce(T) -> Result<T, E>>(&self, f: F) -> Result<Self, E>;
|
||
|
|
}
|