Initial commit

This commit is contained in:
Diggory Blake 2018-09-18 11:39:15 +01:00
commit 37a4b43a29
8 changed files with 555 additions and 0 deletions

31
src/lib.rs Normal file
View file

@ -0,0 +1,31 @@
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>;
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}