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 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_header_allowed(
&self,
header_name: &str,
header_value: &str,
) -> AclClassification
pub fn is_header_allowed( &self, header_name: &str, header_value: &str, ) -> AclClassification
Returns whether a header is allowed.
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