[][src]Trait conjure_http::server::Resource

pub trait Resource<I, O>: Sized {
const NAME: &'static str;

    fn endpoints<B, R>() -> Vec<Endpoint<Self, B, R>>
    where
        B: RequestBody<BinaryBody = I>,
        R: VisitResponse<BinaryWriter = O>
; }

An HTTP resource.

The server-half of a Conjure service implements this trait.

Associated Constants

const NAME: &'static str

The resource's name.

Loading content...

Required methods

fn endpoints<B, R>() -> Vec<Endpoint<Self, B, R>> where
    B: RequestBody<BinaryBody = I>,
    R: VisitResponse<BinaryWriter = O>, 

Returns the resource's HTTP endpoints.

Loading content...

Implementors

Loading content...