Struct MethodFilter
pub struct MethodFilter(/* private field */);
A filter that matches one or more HTTP methods.
Implementations
impl MethodFilter
const CONNECT: Self = _;Match
CONNECTrequests.This is useful for implementing HTTP/2's [extended CONNECT method], in which the
:protocolpseudoheader is read (usinghyper::ext::Protocol) and the connection upgraded to a bidirectional byte stream (usinghyper::upgrade::on).As seen in the HTTP Upgrade Token Registry, common uses include WebSockets and proxying UDP or IP – though note that when using
WebSocketUpgradeit's more useful to useanyas HTTP/1.1 WebSockets need to supportGET.const DELETE: Self = _;Match
DELETErequests.const GET: Self = _;Match
GETrequests.const HEAD: Self = _;Match
HEADrequests.const OPTIONS: Self = _;Match
OPTIONSrequests.const PATCH: Self = _;Match
PATCHrequests.const POST: Self = _;Match
POSTrequests.const PUT: Self = _;Match
PUTrequests.const TRACE: Self = _;Match
TRACErequests.const fn or(self, other: Self) -> SelfPerforms the OR operation between the
MethodFilterinselfwithother.
Trait Implementations
impl Clone for MethodFilter
fn clone(&self) -> MethodFilter
impl Copy for MethodFilter
impl Debug for MethodFilter
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl PartialEq for MethodFilter
fn eq(&self, other: &MethodFilter) -> bool
impl StructuralPartialEq for MethodFilter
impl TryFrom<Method> for MethodFilter
type Error = NoMatchingMethodFilter;fn try_from(m: Method) -> Result<Self, NoMatchingMethodFilter>
Auto Trait Implementations
impl Freeze for MethodFilter
impl RefUnwindSafe for MethodFilter
impl Send for MethodFilter
impl Sync for MethodFilter
impl Unpin for MethodFilter
impl UnsafeUnpin for MethodFilter
impl UnwindSafe for MethodFilter
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for MethodFilter
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for MethodFilter
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for MethodFilter
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for MethodFilter
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for MethodFilter
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for MethodFilter
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for MethodFilter
fn from(t: T) -> TReturns the argument unchanged.
impl<T> FromRef<T> for MethodFilter
where
T: Clone,
fn from_ref(input: &T) -> T
impl<T> Instrument for MethodFilter
impl<T> Read<Exclusive, BecauseExclusive> for MethodFilter
where
T: ?Sized,
impl<T> Same for MethodFilter
type Output = T;
impl<T> ToOwned for MethodFilter
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for MethodFilter
impl<T, U> Into<U> for MethodFilter
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for MethodFilter
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for MethodFilter
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip<V> for MethodFilter
where
V: MultiLane<T>,
fn vzip(self) -> V