miasht 0.0.5

Minimum asynchronous HTTP server/client library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use {Method, Version};
use header::Headers;
use status::RawStatus;

pub trait Metadata {
    fn version(&self) -> Version;
    fn headers(&self) -> &Headers;
    fn status(&self) -> Option<&RawStatus>;
    fn method(&self) -> Option<Method>;
    fn path(&self) -> Option<&str>;
    fn is_request(&self) -> bool {
        self.method().is_some()
    }
    fn is_response(&self) -> bool {
        self.status().is_some()
    }
}