1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#![warn(clippy::unwrap_used)]

#[macro_use]
extern crate error_chain;

/// `lib_manifest` defines the structs for specifying a Library's manifest and methods to load it
pub mod lib_manifest;
/// `function` defines functions that form part of a flow
pub mod function;
/// `output_connection` defines a struct for a function's output connection
pub mod output_connection;
/// `manifest` is the struct that specifies the manifest of functions in a flow
pub mod manifest;
/// `input` defines the struct for inputs to functions in a flow
pub mod input;

/// We'll put our errors in an `errors` module, and other modules in this crate will `use errors::*;`
/// to get access to everything `error_chain!` creates.
#[doc(hidden)]
pub mod errors {
    // Create the Error, ErrorKind, ResultExt, and Result types
    error_chain! {}
}

// Specify the errors we will produce and foreign links
#[doc(hidden)]
error_chain! {
    types {
        Error, ErrorKind, ResultExt, Result;
    }

    foreign_links {
        Io(std::io::Error);
        Serde(serde_json::error::Error);
        Recv(std::sync::mpsc::RecvError);
        Provider(provider::errors::Error);
    }
}