Struct rustless::framework::endpoint::Endpoint [] [src]

pub struct Endpoint {
    pub method: Method,
    pub path: Path,
    pub summary: Option<String>,
    pub desc: Option<String>,
    pub coercer: Option<Builder>,
    pub consumes: Option<Vec<Mime>>,
    pub produces: Option<Vec<Mime>>,
    // some fields omitted
}

Fields

method: Method path: Path summary: Option<String> desc: Option<String> coercer: Option<Builder> consumes: Option<Vec<Mime>> produces: Option<Vec<Mime>>

Methods

impl Endpoint
[src]

fn new(method: Method, path: &str) -> Endpoint

fn build<F>(method: Method, path: &str, builder: F) -> Endpoint where F: FnOnce(&mut Endpoint) -> EndpointHandlerPresent

fn summary(&mut self, summary: &str)

fn desc(&mut self, desc: &str)

fn consumes(&mut self, mimes: Vec<Mime>)

fn produces(&mut self, mimes: Vec<Mime>)

fn params<F>(&mut self, builder: F) where F: FnOnce(&mut Builder) + 'static

fn handle<F: 'static>(&mut self, handler: F) -> EndpointHandlerPresent where F: for<'a> Fn(Client<'a>, &JsonValue) -> HandleResult<Client<'a>> + Sync + Send

fn handle_boxed(&mut self, handler: EndpointHandler) -> EndpointHandlerPresent

fn call_endpoint<'a>(&self, params: &mut JsonValue, req: &'a mut Request + 'a, info: &mut CallInfo) -> HandleResult<Response>

Trait Implementations

impl Send for Endpoint
[src]

impl ApiHandler for Endpoint
[src]

fn api_call<'r>(&self, rest_path: &str, params: &mut JsonValue, req: &'r mut Request + 'r, info: &mut CallInfo) -> HandleResult<Response>