pub struct EgressPolicy {
pub allow_plain_http: bool,
pub block_private_networks: bool,
pub max_redirects: usize,
pub max_url_bytes: usize,
}Expand description
Egress policy applied to every initial URL and every redirect.
Fields§
§allow_plain_http: bool§block_private_networks: bool§max_redirects: usize§max_url_bytes: usizeImplementations§
Source§impl EgressPolicy
impl EgressPolicy
pub fn validate(self) -> Result<(), SecurityError>
pub fn validate_target( self, url: &str, resolved_addresses: &[IpAddr], redirect_count: usize, ) -> Result<ValidatedOutboundTarget, SecurityError>
Trait Implementations§
Source§impl Clone for EgressPolicy
impl Clone for EgressPolicy
Source§fn clone(&self) -> EgressPolicy
fn clone(&self) -> EgressPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EgressPolicy
Source§impl Debug for EgressPolicy
impl Debug for EgressPolicy
Source§impl<'de> Deserialize<'de> for EgressPolicy
impl<'de> Deserialize<'de> for EgressPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EgressPolicy
Source§impl PartialEq for EgressPolicy
impl PartialEq for EgressPolicy
Source§impl Serialize for EgressPolicy
impl Serialize for EgressPolicy
impl StructuralPartialEq for EgressPolicy
Auto Trait Implementations§
impl Freeze for EgressPolicy
impl RefUnwindSafe for EgressPolicy
impl Send for EgressPolicy
impl Sync for EgressPolicy
impl Unpin for EgressPolicy
impl UnsafeUnpin for EgressPolicy
impl UnwindSafe for EgressPolicy
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