Struct writium::namespace::Namespace [] [src]

pub struct Namespace { /* fields omitted */ }

Namespace bind with apis and forms an intermediate layer of API. It self doesn't do a thing but it will.

It's name is used to distinguish with other peer APIs and all the sub-API will not see the namespace name segments in the request. If you want the namespace it self to have some functionalities, you need to create a sub-API and name it &[]. But such design is not recommended because it sometimes will make the API work in a weird way, especially when path variables are involved, i.e. the trailing part of the path is used as a variable.

Methods

impl Namespace
[src]

[src]

[src]

[src]

Trait Implementations

impl Clone for Namespace
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Api for Namespace
[src]

Important traits for &'a mut [u8]
[src]

Name of API. It identifies an API and allow Writium to route by URL path segments. Read more

[src]

The route function here will ask every sub-API to make an response in binding order. The collection routing is short-circuiting, i.e., once a sub-API responded, the response is returned and the following it won't check the remaining unchecked sub-apis.

Auto Trait Implementations

impl Send for Namespace

impl Sync for Namespace