#[non_exhaustive]pub struct FirewallRule {
pub priority: i32,
pub action: Action,
pub source_range: String,
pub description: String,
/* private fields */
}Expand description
A single firewall rule that is evaluated against incoming traffic and provides an action to take on matched requests.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.priority: i32A positive integer between [1, Int32.MaxValue-1] that defines the order of rule evaluation. Rules with the lowest priority are evaluated first.
A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous rule matches. Only the action of this rule can be modified by the user.
action: ActionThe action to take on matched requests.
source_range: StringIP address or range, defined using CIDR notation, of requests that this
rule applies to. You can use the wildcard character “*” to match all IPs
equivalent to “0/0” and “::/0” together.
Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32
or 2001:0db8:0000:0042:0000:8a2e:0370:7334.
description: StringAn optional string description of this rule. This field has a maximum length of 100 characters.
Implementations§
Source§impl FirewallRule
impl FirewallRule
Sourcepub fn set_priority<T: Into<i32>>(self, v: T) -> Self
pub fn set_priority<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_action<T: Into<Action>>(self, v: T) -> Self
pub fn set_action<T: Into<Action>>(self, v: T) -> Self
Sourcepub fn set_source_range<T: Into<String>>(self, v: T) -> Self
pub fn set_source_range<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for FirewallRule
impl Clone for FirewallRule
Source§fn clone(&self) -> FirewallRule
fn clone(&self) -> FirewallRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FirewallRule
impl Debug for FirewallRule
Source§impl Default for FirewallRule
impl Default for FirewallRule
Source§fn default() -> FirewallRule
fn default() -> FirewallRule
Source§impl Message for FirewallRule
impl Message for FirewallRule
Source§impl PartialEq for FirewallRule
impl PartialEq for FirewallRule
impl StructuralPartialEq for FirewallRule
Auto Trait Implementations§
impl Freeze for FirewallRule
impl RefUnwindSafe for FirewallRule
impl Send for FirewallRule
impl Sync for FirewallRule
impl Unpin for FirewallRule
impl UnsafeUnpin for FirewallRule
impl UnwindSafe for FirewallRule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request