#[non_exhaustive]pub struct FirewallPolicyRuleMatcherLayer4Config {
pub ip_protocol: Option<String>,
pub ports: Vec<String>,
/* private fields */
}Available on crate features
firewall-policies or instances or network-firewall-policies or networks or region-network-firewall-policies only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ip_protocol: Option<String>The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp,udp, icmp, esp,ah, ipip, sctp), or the IP protocol number.
ports: Vec<String>An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port.
Example inputs include: [“22”],[“80”,“443”], and [“12345-12349”].
Implementations§
Source§impl FirewallPolicyRuleMatcherLayer4Config
impl FirewallPolicyRuleMatcherLayer4Config
pub fn new() -> Self
Sourcepub fn set_ip_protocol<T>(self, v: T) -> Self
pub fn set_ip_protocol<T>(self, v: T) -> Self
Sets the value of ip_protocol.
§Example
ⓘ
let x = FirewallPolicyRuleMatcherLayer4Config::new().set_ip_protocol("example");Sourcepub fn set_or_clear_ip_protocol<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ip_protocol<T>(self, v: Option<T>) -> Self
Sets or clears the value of ip_protocol.
§Example
ⓘ
let x = FirewallPolicyRuleMatcherLayer4Config::new().set_or_clear_ip_protocol(Some("example"));
let x = FirewallPolicyRuleMatcherLayer4Config::new().set_or_clear_ip_protocol(None::<String>);Trait Implementations§
Source§impl Clone for FirewallPolicyRuleMatcherLayer4Config
impl Clone for FirewallPolicyRuleMatcherLayer4Config
Source§fn clone(&self) -> FirewallPolicyRuleMatcherLayer4Config
fn clone(&self) -> FirewallPolicyRuleMatcherLayer4Config
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for FirewallPolicyRuleMatcherLayer4Config
impl Default for FirewallPolicyRuleMatcherLayer4Config
Source§fn default() -> FirewallPolicyRuleMatcherLayer4Config
fn default() -> FirewallPolicyRuleMatcherLayer4Config
Returns the “default value” for a type. Read more
Source§impl PartialEq for FirewallPolicyRuleMatcherLayer4Config
impl PartialEq for FirewallPolicyRuleMatcherLayer4Config
Source§fn eq(&self, other: &FirewallPolicyRuleMatcherLayer4Config) -> bool
fn eq(&self, other: &FirewallPolicyRuleMatcherLayer4Config) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FirewallPolicyRuleMatcherLayer4Config
Auto Trait Implementations§
impl Freeze for FirewallPolicyRuleMatcherLayer4Config
impl RefUnwindSafe for FirewallPolicyRuleMatcherLayer4Config
impl Send for FirewallPolicyRuleMatcherLayer4Config
impl Sync for FirewallPolicyRuleMatcherLayer4Config
impl Unpin for FirewallPolicyRuleMatcherLayer4Config
impl UnwindSafe for FirewallPolicyRuleMatcherLayer4Config
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