pub trait AttributesBinding {
// Required methods
fn extract_headers(&self) -> HashMap<String, String>;
fn extract_header(&self, key: &str) -> Option<String>;
// Provided methods
fn extract_query_params(&self) -> HashMap<String, String> { ... }
fn method(&self) -> Option<String> { ... }
fn path(&self) -> Option<String> { ... }
fn uri(&self) -> Option<String> { ... }
fn remote_address(&self) -> Option<String> { ... }
fn local_address(&self) -> Option<String> { ... }
fn query_string(&self) -> Option<String> { ... }
fn scheme(&self) -> Option<String> { ... }
fn version(&self) -> Option<String> { ... }
fn status_code(&self) -> Option<u32> { ... }
}Expand description
Binding for the top-level attributes variable.
Required Methods§
Sourcefn extract_headers(&self) -> HashMap<String, String>
fn extract_headers(&self) -> HashMap<String, String>
Returns the entire headers map.
Sourcefn extract_header(&self, key: &str) -> Option<String>
fn extract_header(&self, key: &str) -> Option<String>
Returns a single header.
Provided Methods§
Sourcefn extract_query_params(&self) -> HashMap<String, String>
fn extract_query_params(&self) -> HashMap<String, String>
Returns a map with the query parameters.
Sourcefn remote_address(&self) -> Option<String>
fn remote_address(&self) -> Option<String>
Returns the attributes.remoteAddress value.
Sourcefn local_address(&self) -> Option<String>
fn local_address(&self) -> Option<String>
Returns the attributes.localAddress value.
Sourcefn query_string(&self) -> Option<String>
fn query_string(&self) -> Option<String>
Returns the attributes.queryString value.
Sourcefn status_code(&self) -> Option<u32>
fn status_code(&self) -> Option<u32>
Returns the attributes.statusCode value.