pub struct RequestMeta<'a> {
pub peer_ip: &'a str,
}Expand description
Extra per-request metadata passed to Plugin::on_request_with_meta.
Borrowed so the server layer can construct it cheaply per request without copying. New fields may be added over time; plugins that only care about a subset should destructure by name, not by position.
Fields§
§peer_ip: &'a strPeer IP as a string (may be empty if not derivable from the transport, e.g. unix sockets). Routing middleware uses this to rate-limit anonymous traffic per-IP rather than collapsing every anon caller into one global bucket.
Trait Implementations§
Source§impl<'a> Clone for RequestMeta<'a>
impl<'a> Clone for RequestMeta<'a>
Source§fn clone(&self) -> RequestMeta<'a>
fn clone(&self) -> RequestMeta<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for RequestMeta<'a>
impl<'a> RefUnwindSafe for RequestMeta<'a>
impl<'a> Send for RequestMeta<'a>
impl<'a> Sync for RequestMeta<'a>
impl<'a> Unpin for RequestMeta<'a>
impl<'a> UnsafeUnpin for RequestMeta<'a>
impl<'a> UnwindSafe for RequestMeta<'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