pub struct HandlerAttributesBinding<'a> { /* private fields */ }Expand description
A wrapper that implements the AttributesBinding trait for the handlers provided by the PDK.
Implementations§
Source§impl<'a> HandlerAttributesBinding<'a>
impl<'a> HandlerAttributesBinding<'a>
Sourcepub fn new(
handler: &'a dyn HeadersHandler,
properties: &'a dyn PropertyAccessor,
) -> Self
pub fn new( handler: &'a dyn HeadersHandler, properties: &'a dyn PropertyAccessor, ) -> Self
Will create a binding that will resolve all properties of the attributes variable.
Sourcepub fn partial(handler: &'a dyn HeadersHandler) -> Self
pub fn partial(handler: &'a dyn HeadersHandler) -> Self
Will create a binding that won’t be able to resolve remote_address, local_address, scheme or version
Trait Implementations§
Source§impl AttributesBinding for HandlerAttributesBinding<'_>
impl AttributesBinding for HandlerAttributesBinding<'_>
Source§fn remote_address(&self) -> Option<String>
fn remote_address(&self) -> Option<String>
Returns the
attributes.remoteAddress value.Source§fn local_address(&self) -> Option<String>
fn local_address(&self) -> Option<String>
Returns the
attributes.localAddress value.Source§fn extract_query_params(&self) -> HashMap<String, String>
fn extract_query_params(&self) -> HashMap<String, String>
Returns a map with the query parameters.
Source§fn query_string(&self) -> Option<String>
fn query_string(&self) -> Option<String>
Returns the
attributes.queryString value.Source§fn status_code(&self) -> Option<u32>
fn status_code(&self) -> Option<u32>
Returns the
attributes.statusCode value.Auto Trait Implementations§
impl<'a> Freeze for HandlerAttributesBinding<'a>
impl<'a> !RefUnwindSafe for HandlerAttributesBinding<'a>
impl<'a> !Send for HandlerAttributesBinding<'a>
impl<'a> !Sync for HandlerAttributesBinding<'a>
impl<'a> Unpin for HandlerAttributesBinding<'a>
impl<'a> !UnwindSafe for HandlerAttributesBinding<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more