pub struct RequestInfo<'a> {
pub method: &'static str,
pub method_original: Option<&'a str>,
pub path: &'a str,
pub scheme: &'a str,
pub route: Option<&'a str>,
pub server_address: Option<&'a str>,
pub server_port: Option<u16>,
pub protocol_version: &'static str,
pub user_agent: Option<&'a str>,
}Expand description
What an incoming request’s span records, as the HTTP semantic
conventions name it. Handed to a span-making hook; see
server_span!.
Fields§
§method: &'static strhttp.request.method: a known method, or _OTHER.
method_original: Option<&'a str>http.request.method_original, for _OTHER.
path: &'a strurl.path. The query isn’t recorded; it may hold secrets.
scheme: &'a strurl.scheme.
route: Option<&'a str>http.route: the route template that matched, such as
/items/{id}, if the layer knows it.
server_address: Option<&'a str>server.address, from the URI or the Host header.
server_port: Option<u16>server.port.
protocol_version: &'static strnetwork.protocol.version, such as 1.1 or 2.
user_agent: Option<&'a str>user_agent.original.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for RequestInfo<'a>
impl<'a> Freeze for RequestInfo<'a>
impl<'a> Move for RequestInfo<'a>
impl<'a> RefUnwindSafe for RequestInfo<'a>
impl<'a> Send for RequestInfo<'a>
impl<'a> Sync for RequestInfo<'a>
impl<'a> Unpin for RequestInfo<'a>
impl<'a> UnsafeUnpin for RequestInfo<'a>
impl<'a> UnwindSafe for RequestInfo<'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