pub struct HttpAcl { /* private fields */ }Expand description
Represents an HTTP ACL.
Implementations§
source§impl HttpAcl
impl HttpAcl
sourcepub fn builder() -> HttpAclBuilder
pub fn builder() -> HttpAclBuilder
Returns a new HttpAclBuilder.
sourcepub fn allow_http(&self) -> bool
pub fn allow_http(&self) -> bool
Returns whether HTTP is allowed.
sourcepub fn allow_https(&self) -> bool
pub fn allow_https(&self) -> bool
Returns whether HTTPS is allowed.
sourcepub fn allow_private_ip_ranges(&self) -> bool
pub fn allow_private_ip_ranges(&self) -> bool
Returns whether private IP ranges are allowed.
sourcepub fn method_acl_default(&self) -> bool
pub fn method_acl_default(&self) -> bool
Returns the default action for HTTP methods if no ACL match is found.
sourcepub fn host_acl_default(&self) -> bool
pub fn host_acl_default(&self) -> bool
Returns the default action for hosts if no ACL match is found.
sourcepub fn port_acl_default(&self) -> bool
pub fn port_acl_default(&self) -> bool
Returns the default action for ports if no ACL match is found.
sourcepub fn ip_acl_default(&self) -> bool
pub fn ip_acl_default(&self) -> bool
Returns the default action for IPs if no ACL match is found.
sourcepub fn allowed_methods(&self) -> &[HttpRequestMethod]
pub fn allowed_methods(&self) -> &[HttpRequestMethod]
Returns the allowed methods.
sourcepub fn denied_methods(&self) -> &[HttpRequestMethod]
pub fn denied_methods(&self) -> &[HttpRequestMethod]
Returns the denied methods.
sourcepub fn is_scheme_allowed(&self, scheme: &str) -> AclClassification
pub fn is_scheme_allowed(&self, scheme: &str) -> AclClassification
Returns whether the scheme is allowed.
sourcepub fn is_method_allowed(
&self,
method: impl Into<HttpRequestMethod>,
) -> AclClassification
pub fn is_method_allowed( &self, method: impl Into<HttpRequestMethod>, ) -> AclClassification
Returns whether the method is allowed.
sourcepub fn is_host_allowed(&self, host: &str) -> AclClassification
pub fn is_host_allowed(&self, host: &str) -> AclClassification
Returns whether the host is allowed.
sourcepub fn is_port_allowed(&self, port: u16) -> AclClassification
pub fn is_port_allowed(&self, port: u16) -> AclClassification
Returns whether the port is allowed.
sourcepub fn is_ip_allowed(&self, ip: &IpAddr) -> AclClassification
pub fn is_ip_allowed(&self, ip: &IpAddr) -> AclClassification
Returns whether an IP is allowed.
sourcepub fn resolve_static_dns_mapping(&self, host: &str) -> Option<SocketAddr>
pub fn resolve_static_dns_mapping(&self, host: &str) -> Option<SocketAddr>
Resolve static DNS mapping.
sourcepub fn is_url_path_allowed(&self, url_path: &str) -> AclClassification
pub fn is_url_path_allowed(&self, url_path: &str) -> AclClassification
Returns whether a URL path is allowed.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HttpAcl
impl !RefUnwindSafe for HttpAcl
impl Send for HttpAcl
impl Sync for HttpAcl
impl Unpin for HttpAcl
impl UnwindSafe for HttpAcl
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)