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:
@@ -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>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user