pub(crate) struct Route {
body: BodyState,
remote_addr: Option<SocketAddr>,
req: Request<Body>,
segments_index: usize,
}
Fields§
§body: BodyState
§remote_addr: Option<SocketAddr>
§req: Request<Body>
§segments_index: usize
Implementations§
source§impl Route
impl Route
pub(crate) fn new( req: Request<Body>, remote_addr: Option<SocketAddr>, ) -> RefCell<Route>
pub(crate) fn method(&self) -> &Method
pub(crate) fn headers(&self) -> &HeaderMap
pub(crate) fn version(&self) -> Version
pub(crate) fn extensions(&self) -> &Extensions
pub(crate) fn uri(&self) -> &Uri
pub(crate) fn path(&self) -> &str
pub(crate) fn full_path(&self) -> &str
pub(crate) fn set_unmatched_path(&mut self, index: usize)
pub(crate) fn query(&self) -> Option<&str>
pub(crate) fn matched_path_index(&self) -> usize
pub(crate) fn reset_matched_path_index(&mut self, index: usize)
pub(crate) fn remote_addr(&self) -> Option<SocketAddr>
pub(crate) fn take_body(&mut self) -> Option<Body>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Route
impl !RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl !UnwindSafe for Route
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