pub struct EgressAllowlist { /* private fields */ }Expand description
Data-only builder for deterministic egress allowlists.
Implementations§
Source§impl EgressAllowlist
impl EgressAllowlist
Sourcepub fn allow(self, target: impl Into<String>) -> Self
pub fn allow(self, target: impl Into<String>) -> Self
Adds one allowlist target for validation during lowering.
Sourcepub fn try_allow(self, target: impl AsRef<str>) -> Result<Self, AgentError>
pub fn try_allow(self, target: impl AsRef<str>) -> Result<Self, AgentError>
Adds and validates one allowlist target immediately.
Sourcepub fn from_targets(
targets: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn from_targets( targets: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Builds an allowlist from multiple targets.
Sourcepub fn try_from_targets(
targets: impl IntoIterator<Item = impl AsRef<str>>,
) -> Result<Self, AgentError>
pub fn try_from_targets( targets: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<Self, AgentError>
Builds and validates an allowlist from multiple targets.
Sourcepub fn targets(&self) -> Result<Vec<EgressTarget>, AgentError>
pub fn targets(&self) -> Result<Vec<EgressTarget>, AgentError>
Returns canonical targets in deterministic order.
Sourcepub fn canonical_entries(&self) -> Result<Vec<String>, AgentError>
pub fn canonical_entries(&self) -> Result<Vec<String>, AgentError>
Returns canonical egress rule entries suitable for core NetworkIsolationPolicy.
Sourcepub fn network_policy(&self) -> Result<NetworkIsolationPolicy, AgentError>
pub fn network_policy(&self) -> Result<NetworkIsolationPolicy, AgentError>
Lowers this toolkit helper into the core network policy contract.
Trait Implementations§
Source§impl Clone for EgressAllowlist
impl Clone for EgressAllowlist
Source§fn clone(&self) -> EgressAllowlist
fn clone(&self) -> EgressAllowlist
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EgressAllowlist
impl Debug for EgressAllowlist
Source§impl Default for EgressAllowlist
impl Default for EgressAllowlist
Source§fn default() -> EgressAllowlist
fn default() -> EgressAllowlist
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EgressAllowlist
impl<'de> Deserialize<'de> for EgressAllowlist
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EgressAllowlist
Source§impl PartialEq for EgressAllowlist
impl PartialEq for EgressAllowlist
Source§fn eq(&self, other: &EgressAllowlist) -> bool
fn eq(&self, other: &EgressAllowlist) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EgressAllowlist
impl Serialize for EgressAllowlist
impl StructuralPartialEq for EgressAllowlist
Auto Trait Implementations§
impl Freeze for EgressAllowlist
impl RefUnwindSafe for EgressAllowlist
impl Send for EgressAllowlist
impl Sync for EgressAllowlist
impl Unpin for EgressAllowlist
impl UnsafeUnpin for EgressAllowlist
impl UnwindSafe for EgressAllowlist
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
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§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
Compare self to
key and return true if they are equal.