pub struct AclRule {
pub name: String,
pub direction: i32,
pub priority: i32,
pub protocol: i32,
pub first_port: i32,
pub last_port: i32,
pub cidr_block: String,
pub action: i32,
}Expand description
An ACL rule: accepts or drops the traffic it matches in one direction.
Fields§
§name: StringThe rule’s resource name.
direction: i32Which traffic the rule applies to.
priority: i32The rule’s place in its direction, from 1; lower comes first. No two rules of a direction share one.
protocol: i32The traffic the rule matches.
first_port: i32The first port the rule matches, for acl_rule::Protocol::Tcp and acl_rule::Protocol::Udp. Each set of
ports has one spelling, and the rule reads back in it: first_port 0
and last_port 0 match every port, a last_port of 0 the single port
first_port, and a first_port below last_port the range between
them. Any other spelling of a set is refused with INVALID_ARGUMENT
naming the one to use: first_port 22 and last_port 22 is
first_port 22 and last_port 0, and 0 or 1 to 65535 is 0 and 0.
last_port: i32The last port the rule matches, above first_port; 0 for the single
port first_port, or with first_port 0 for every port.
cidr_block: StringThe far side’s range: where entering traffic comes from, or where leaving traffic goes to.
action: i32What the rule does with the traffic it matches.
Implementations§
Source§impl AclRule
impl AclRule
Sourcepub fn direction(&self) -> Direction
pub fn direction(&self) -> Direction
Returns the enum value of direction, or the default if the field is set to an invalid enum value.
Sourcepub fn set_direction(&mut self, value: Direction)
pub fn set_direction(&mut self, value: Direction)
Sets direction to the provided enum value.
Sourcepub fn protocol(&self) -> Protocol
pub fn protocol(&self) -> Protocol
Returns the enum value of protocol, or the default if the field is set to an invalid enum value.
Sourcepub fn set_protocol(&mut self, value: Protocol)
pub fn set_protocol(&mut self, value: Protocol)
Sets protocol to the provided enum value.
Sourcepub fn action(&self) -> Action
pub fn action(&self) -> Action
Returns the enum value of action, or the default if the field is set to an invalid enum value.
Sourcepub fn set_action(&mut self, value: Action)
pub fn set_action(&mut self, value: Action)
Sets action to the provided enum value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AclRule
impl<'de> Deserialize<'de> for AclRule
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
impl Eq for AclRule
Source§impl Message for AclRule
impl Message for AclRule
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for AclRule
Auto Trait Implementations§
impl Forget for AclRule
impl Freeze for AclRule
impl RefUnwindSafe for AclRule
impl Send for AclRule
impl Sync for AclRule
impl Unpin for AclRule
impl UnsafeUnpin for AclRule
impl UnwindSafe for AclRule
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.