#[non_exhaustive]pub struct SecurityPolicyUserDefinedField {
pub base: Option<Base>,
pub mask: Option<String>,
pub name: Option<String>,
pub offset: Option<i32>,
pub size: Option<i32>,
/* private fields */
}Available on crate features
organization-security-policies or region-security-policies or security-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.base: Option<Base>The base relative to which ‘offset’ is measured. Possible values are:
- IPV4: Points to the beginning of the IPv4 header.
- IPV6: Points to the beginning of the IPv6 header.
- TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments.
- UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments.
required
mask: Option<String>If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with “0x”). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
name: Option<String>The name of this field. Must be unique within the policy.
offset: Option<i32>Offset of the first byte of the field (in network byte order) relative to ‘base’.
size: Option<i32>Size of the field in bytes. Valid values: 1-4.
Implementations§
Source§impl SecurityPolicyUserDefinedField
impl SecurityPolicyUserDefinedField
pub fn new() -> Self
Sourcepub fn set_base<T>(self, v: T) -> Self
pub fn set_base<T>(self, v: T) -> Self
Sets the value of base.
§Example
ⓘ
use google_cloud_compute_v1::model::security_policy_user_defined_field::Base;
let x0 = SecurityPolicyUserDefinedField::new().set_base(Base::Ipv6);
let x1 = SecurityPolicyUserDefinedField::new().set_base(Base::Tcp);
let x2 = SecurityPolicyUserDefinedField::new().set_base(Base::Udp);Sourcepub fn set_or_clear_base<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_base<T>(self, v: Option<T>) -> Self
Sets or clears the value of base.
§Example
ⓘ
use google_cloud_compute_v1::model::security_policy_user_defined_field::Base;
let x0 = SecurityPolicyUserDefinedField::new().set_or_clear_base(Some(Base::Ipv6));
let x1 = SecurityPolicyUserDefinedField::new().set_or_clear_base(Some(Base::Tcp));
let x2 = SecurityPolicyUserDefinedField::new().set_or_clear_base(Some(Base::Udp));
let x_none = SecurityPolicyUserDefinedField::new().set_or_clear_base(None::<Base>);Sourcepub fn set_or_clear_mask<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_mask<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_offset<T>(self, v: T) -> Self
pub fn set_offset<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_offset<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_offset<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for SecurityPolicyUserDefinedField
impl Clone for SecurityPolicyUserDefinedField
Source§fn clone(&self) -> SecurityPolicyUserDefinedField
fn clone(&self) -> SecurityPolicyUserDefinedField
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 SecurityPolicyUserDefinedField
impl Default for SecurityPolicyUserDefinedField
Source§fn default() -> SecurityPolicyUserDefinedField
fn default() -> SecurityPolicyUserDefinedField
Returns the “default value” for a type. Read more
Source§impl PartialEq for SecurityPolicyUserDefinedField
impl PartialEq for SecurityPolicyUserDefinedField
Source§fn eq(&self, other: &SecurityPolicyUserDefinedField) -> bool
fn eq(&self, other: &SecurityPolicyUserDefinedField) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SecurityPolicyUserDefinedField
Auto Trait Implementations§
impl Freeze for SecurityPolicyUserDefinedField
impl RefUnwindSafe for SecurityPolicyUserDefinedField
impl Send for SecurityPolicyUserDefinedField
impl Sync for SecurityPolicyUserDefinedField
impl Unpin for SecurityPolicyUserDefinedField
impl UnwindSafe for SecurityPolicyUserDefinedField
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