pub struct MethodFilter(/* private fields */);
Expand description
A filter that matches one or more HTTP methods.
Implementations§
Source§impl MethodFilter
impl MethodFilter
Sourcepub const CONNECT: Self
pub const CONNECT: Self
Match CONNECT
requests.
This is useful for implementing HTTP/2’s [extended CONNECT method],
in which the :protocol
pseudoheader is read
(using [hyper::ext::Protocol
])
and the connection upgraded to a bidirectional byte stream
(using [hyper::upgrade::on
]).
As seen in the HTTP Upgrade Token Registry,
common uses include WebSockets and proxying UDP or IP –
though note that when using WebSocketUpgrade
it’s more useful to use any
as HTTP/1.1 WebSockets need to support GET
.
Sourcepub const fn or(self, other: Self) -> Self
pub const fn or(self, other: Self) -> Self
Performs the OR operation between the MethodFilter
in self
with other
.
Trait Implementations§
Source§impl Clone for MethodFilter
impl Clone for MethodFilter
Source§fn clone(&self) -> MethodFilter
fn clone(&self) -> MethodFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MethodFilter
impl Debug for MethodFilter
Source§impl PartialEq for MethodFilter
impl PartialEq for MethodFilter
Source§impl TryFrom<Method> for MethodFilter
impl TryFrom<Method> for MethodFilter
impl Copy for MethodFilter
impl StructuralPartialEq for MethodFilter
Auto Trait Implementations§
impl Freeze for MethodFilter
impl RefUnwindSafe for MethodFilter
impl Send for MethodFilter
impl Sync for MethodFilter
impl Unpin for MethodFilter
impl UnwindSafe for MethodFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 2 bytes