Struct writium::Writium
[−]
[src]
pub struct Writium { /* fields omitted */ }
The element Writium.
Writium holds all the APIs and transform hyper
data types into what
Writium APIs can utilize. Itself can be considered a Namespace
interfacing
hyper
-variant frameworks.
Methods
impl Writium
[src]
pub fn new() -> Writium
[src]
Create a new instance of Writium
.
ⓘImportant traits for Box<W>pub fn route(
&self,
req: HyperRequest
) -> Box<Future<Item = HyperResponse, Error = Error>>
[src]
ⓘImportant traits for Box<W>
&self,
req: HyperRequest
) -> Box<Future<Item = HyperResponse, Error = Error>>
Route a HyperRequest
to target API and return a Future
of
HyperResponse
.
pub fn bind<A: Api + 'static>(&mut self, api: A)
[src]
Bind an API to the root namespace. See Namespace
's bind()
for more
information.