pub enum Methods<'a> {
Any,
Only(&'a [Method]),
}Expand description
The HTTP methods a Route responds to, as returned by
Route::methods.
Most routes respond to a fixed set of methods, usually a single one.
Methods::Any marks a route that accepts every method at its path, like
an adapter forwarding requests to an external service. A route registered
for a specific method takes precedence over an any-method route at the
same path.
Variants§
Any
The route accepts every HTTP method.
Only(&'a [Method])
The route accepts exactly the listed methods.
Trait Implementations§
impl<'a> Copy for Methods<'a>
impl<'a> Eq for Methods<'a>
Source§impl From<Methods<'static>> for OwnedMethods
impl From<Methods<'static>> for OwnedMethods
impl<'a> StructuralPartialEq for Methods<'a>
Auto Trait Implementations§
impl<'a> Freeze for Methods<'a>
impl<'a> RefUnwindSafe for Methods<'a>
impl<'a> Send for Methods<'a>
impl<'a> Sync for Methods<'a>
impl<'a> Unpin for Methods<'a>
impl<'a> UnsafeUnpin for Methods<'a>
impl<'a> UnwindSafe for Methods<'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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.