pub struct Target { /* private fields */ }Expand description
Validated target ranges, relative until Target::shifted binds an owner.
Implementations§
Source§impl Target
impl Target
pub fn parse(method: &[u8], target: &[u8]) -> Result<Self, Error>
pub fn shifted(self, base: usize) -> Result<Self, Error>
pub const fn form(self) -> Form
Sourcepub const fn path_span(self) -> Span
pub const fn path_span(self) -> Span
The source range backing the normalized route path. An empty range is
intentional for an absolute URI whose omitted path routes as /.
pub const fn query_span(self) -> Option<Span>
Sourcepub fn route_path(self, request: &[u8]) -> Option<&[u8]>
pub fn route_path(self, request: &[u8]) -> Option<&[u8]>
Projects the path used by an origin router without allocating or rewriting the original request-target.
Trait Implementations§
impl Copy for Target
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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