Loading local Dapps from FS. (#1214)

* apps list to separate module

* Preparing to support serving files from disk

* Serving files from disk

* Using dapps path from CLI

* Adding more docs
This commit is contained in:
Tomasz Drwięga
2016-06-03 11:51:11 +02:00
committed by Gav Wood
parent 81d8dafd9e
commit bb1b8cc08a
16 changed files with 657 additions and 241 deletions

View File

@@ -30,17 +30,17 @@ pub struct EndpointPath {
pub port: u16,
}
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Clone)]
pub struct EndpointInfo {
pub name: &'static str,
pub description: &'static str,
pub version: &'static str,
pub author: &'static str,
pub icon_url: &'static str,
pub name: String,
pub description: String,
pub version: String,
pub author: String,
pub icon_url: String,
}
pub trait Endpoint : Send + Sync {
fn info(&self) -> Option<EndpointInfo> { None }
fn info(&self) -> Option<&EndpointInfo> { None }
fn to_handler(&self, path: EndpointPath) -> Box<server::Handler<HttpStream>>;
}