pub struct EventData<'a, S: Event> { /* private fields */ }Expand description
Manages the access to the data of each event.
Implementations§
Source§impl EventData<'_, RequestHeaders>
impl EventData<'_, RequestHeaders>
Source§impl EventData<'_, ResponseHeaders>
impl EventData<'_, ResponseHeaders>
pub fn status_code(&self) -> u32
Source§impl EventData<'_, RequestTrailers>
impl EventData<'_, RequestTrailers>
Trait Implementations§
Source§impl HeadersAccessor for EventData<'_, RequestHeaders>
impl HeadersAccessor for EventData<'_, RequestHeaders>
Source§fn header(&self, name: &str) -> Option<String>
fn header(&self, name: &str) -> Option<String>
Return the first header value for the given name.
Known Limitations: The header value will be converted to an utf-8 String
If the bytes correspond to a non utf-8 string they will be parsed as an iso_8859_1 encoding.
Source§fn headers(&self) -> Vec<(String, String)>
fn headers(&self) -> Vec<(String, String)>
Returns a copy of all the headers.
Known Limitations: The header values will be converted to utf-8 Strings
If the bytes correspond to a non utf-8 string they will be parsed as an iso_8859_1 encoding.
Source§fn add_header(&self, name: &str, value: &str)
fn add_header(&self, name: &str, value: &str)
Adds a new value of the header to the event.
Source§fn set_header(&self, name: &str, value: &str)
fn set_header(&self, name: &str, value: &str)
Replaces value of the header to the event.
Source§fn remove_header(&self, name: &str)
fn remove_header(&self, name: &str)
Removes the specified header.
Source§impl HeadersAccessor for EventData<'_, ResponseHeaders>
impl HeadersAccessor for EventData<'_, ResponseHeaders>
Source§fn header(&self, name: &str) -> Option<String>
fn header(&self, name: &str) -> Option<String>
Return the first header value for the given name.
Known Limitations: The header value will be converted to an utf-8 String
If the bytes correspond to a non utf-8 string they will be parsed as an iso_8859_1 encoding.
Source§fn headers(&self) -> Vec<(String, String)>
fn headers(&self) -> Vec<(String, String)>
Returns a copy of all the headers.
Known Limitations: The header values will be converted to utf-8 Strings
If the bytes correspond to a non utf-8 string they will be parsed as an iso_8859_1 encoding.
Source§fn add_header(&self, name: &str, value: &str)
fn add_header(&self, name: &str, value: &str)
Adds a new value of the header to the event.
Source§fn set_header(&self, name: &str, value: &str)
fn set_header(&self, name: &str, value: &str)
Replaces value of the header to the event.
Source§fn remove_header(&self, name: &str)
fn remove_header(&self, name: &str)
Removes the specified header.
Auto Trait Implementations§
impl<'a, S> Freeze for EventData<'a, S>where
S: Freeze,
impl<'a, S> !RefUnwindSafe for EventData<'a, S>
impl<'a, S> !Send for EventData<'a, S>
impl<'a, S> !Sync for EventData<'a, S>
impl<'a, S> Unpin for EventData<'a, S>
impl<'a, S> !UnwindSafe for EventData<'a, S>
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