pub struct SecurityValidator { /* private fields */ }Expand description
Security validator for targets and configurations
Implementations§
Source§impl SecurityValidator
impl SecurityValidator
Sourcepub const fn allow_private_ips(self, allow: bool) -> Self
pub const fn allow_private_ips(self, allow: bool) -> Self
Allow or disallow private IP addresses
Sourcepub const fn allow_localhost(self, allow: bool) -> Self
pub const fn allow_localhost(self, allow: bool) -> Self
Allow or disallow localhost connections
Sourcepub fn allowed_ports(self, ports: Option<Vec<u16>>) -> Self
pub fn allowed_ports(self, ports: Option<Vec<u16>>) -> Self
Set allowed ports (if None, all ports except blocked are allowed)
Sourcepub fn blocked_ports(self, ports: Vec<u16>) -> Self
pub fn blocked_ports(self, ports: Vec<u16>) -> Self
Set blocked ports
Sourcepub const fn max_hostname_length(self, length: usize) -> Self
pub const fn max_hostname_length(self, length: usize) -> Self
Set maximum hostname length
Sourcepub const fn max_url_length(self, length: usize) -> Self
pub const fn max_url_length(self, length: usize) -> Self
Set maximum URL length
Source§impl SecurityValidator
Production-ready security configuration
impl SecurityValidator
Production-ready security configuration
Sourcepub fn production() -> Self
pub fn production() -> Self
Strict security configuration for production environments
Sourcepub fn development() -> Self
pub fn development() -> Self
Development-friendly security configuration
Trait Implementations§
Source§impl Clone for SecurityValidator
impl Clone for SecurityValidator
Source§fn clone(&self) -> SecurityValidator
fn clone(&self) -> SecurityValidator
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 moreSource§impl Debug for SecurityValidator
impl Debug for SecurityValidator
Auto Trait Implementations§
impl Freeze for SecurityValidator
impl RefUnwindSafe for SecurityValidator
impl Send for SecurityValidator
impl Sync for SecurityValidator
impl Unpin for SecurityValidator
impl UnsafeUnpin for SecurityValidator
impl UnwindSafe for SecurityValidator
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