pub struct AllowMethods(/* private fields */);Expand description
Configuration for the Access-Control-Allow-Methods header.
Implementations§
Source§impl AllowMethods
impl AllowMethods
Sourcepub fn any() -> Self
pub fn any() -> Self
Responds with *. Incompatible with credentials; see CorsBuilder::build.
Sourcepub fn list<I>(methods: I) -> Selfwhere
I: IntoIterator<Item = Method>,
pub fn list<I>(methods: I) -> Selfwhere
I: IntoIterator<Item = Method>,
Responds with a fixed set of methods.
Sourcepub fn mirror_request() -> Self
pub fn mirror_request() -> Self
Echoes the request’s Access-Control-Request-Method header.
The reflected value is validated as an HTTP token; non-token values are dropped so a malformed request header cannot inject control characters into the response.
Trait Implementations§
Source§impl Clone for AllowMethods
impl Clone for AllowMethods
Source§impl Debug for AllowMethods
impl Debug for AllowMethods
Source§impl Default for AllowMethods
impl Default for AllowMethods
Auto Trait Implementations§
impl !Freeze for AllowMethods
impl RefUnwindSafe for AllowMethods
impl Send for AllowMethods
impl Sync for AllowMethods
impl Unpin for AllowMethods
impl UnsafeUnpin for AllowMethods
impl UnwindSafe for AllowMethods
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