pub struct MethodAllowList { /* private fields */ }
Expand description
The variant of AllowedMethods
that only allows a finite set of HTTP methods for a given path.
Check out AllowedMethods
for more information.
Implementations§
Source§impl MethodAllowList
impl MethodAllowList
Sourcepub fn iter(&self) -> impl Iterator<Item = &Method>
pub fn iter(&self) -> impl Iterator<Item = &Method>
Iterate over the allowed methods, returned as a reference.
Sourcepub fn allow_header_value(&self) -> Option<HeaderValue>
pub fn allow_header_value(&self) -> Option<HeaderValue>
The value that should be set for the Allow
header
in a 405 Method Not Allowed
response for this route path.
It returns None
if there are no allowed methods.
It returns the comma-separated list of allowed methods otherwise.
Trait Implementations§
Source§impl Clone for MethodAllowList
impl Clone for MethodAllowList
Source§fn clone(&self) -> MethodAllowList
fn clone(&self) -> MethodAllowList
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MethodAllowList
impl Debug for MethodAllowList
Source§impl From<MethodAllowList> for AllowedMethods
impl From<MethodAllowList> for AllowedMethods
Source§fn from(methods: MethodAllowList) -> Self
fn from(methods: MethodAllowList) -> Self
Converts to this type from the input type.
Source§impl FromIterator<Method> for MethodAllowList
impl FromIterator<Method> for MethodAllowList
Source§fn from_iter<I: IntoIterator<Item = Method>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Method>>(iter: I) -> Self
Create a new instance of MethodAllowList
from an iterator
that yields Method
s.
Auto Trait Implementations§
impl Freeze for MethodAllowList
impl RefUnwindSafe for MethodAllowList
impl Send for MethodAllowList
impl Sync for MethodAllowList
impl Unpin for MethodAllowList
impl UnwindSafe for MethodAllowList
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