pub struct AllowPrivateNetwork(/* private fields */);
Available on crate feature
cors
only.Expand description
Holds configuration for how to set the Access-Control-Allow-Private-Network
header.
See CorsLayer::allow_private_network
for more details.
Implementations§
Source§impl AllowPrivateNetwork
impl AllowPrivateNetwork
Sourcepub fn yes() -> Self
pub fn yes() -> Self
Allow requests via a more private network than the one used to access the origin
See CorsLayer::allow_private_network
for more details.
Sourcepub fn predicate<F>(f: F) -> Self
pub fn predicate<F>(f: F) -> Self
Allow requests via private network for some requests, based on a given predicate
The first argument to the predicate is the request origin.
See CorsLayer::allow_private_network
for more details.
Trait Implementations§
Source§impl Clone for AllowPrivateNetwork
impl Clone for AllowPrivateNetwork
Source§fn clone(&self) -> AllowPrivateNetwork
fn clone(&self) -> AllowPrivateNetwork
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 AllowPrivateNetwork
impl Debug for AllowPrivateNetwork
Source§impl Default for AllowPrivateNetwork
impl Default for AllowPrivateNetwork
Source§fn default() -> AllowPrivateNetwork
fn default() -> AllowPrivateNetwork
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AllowPrivateNetwork
impl !RefUnwindSafe for AllowPrivateNetwork
impl Send for AllowPrivateNetwork
impl Sync for AllowPrivateNetwork
impl Unpin for AllowPrivateNetwork
impl !UnwindSafe for AllowPrivateNetwork
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