pub struct SecretRoute { /* private fields */ }Expand description
One METHOD /path rule.
Implementations§
Source§impl Route
impl Route
Sourcepub fn parse(text: &str) -> Result<Self, String>
pub fn parse(text: &str) -> Result<Self, String>
Parse METHOD /path; the error says what is wrong.
Sourcepub fn matches(&self, method: &str, path: &RequestPath) -> bool
pub fn matches(&self, method: &str, path: &RequestPath) -> bool
Whether a method request for path matches this rule.
Sourcepub fn could_match(
&self,
method: Option<&str>,
path: Option<&[Partial]>,
) -> bool
pub fn could_match( &self, method: Option<&str>, path: Option<&[Partial]>, ) -> bool
Whether a request known only in part could match this rule: method
None is any method, path None any path, and a path’s
[Partial::One] and [Partial::Rest] segments anything they may
hold (ADR-062: what the hook reads in a command before it runs).
Trait Implementations§
impl Eq for Route
impl StructuralPartialEq for Route
Auto Trait Implementations§
impl Forget for Route
impl Freeze for Route
impl Move for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin 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