pub struct EgressTarget {
pub host: String,
pub port: u16,
pub protocol: EgressProtocol,
}Expand description
One canonical egress target requested for an isolated environment. The value is policy intent, not proof that a runtime has enforced it.
Fields§
§host: StringDomain or host alias requested by policy.
port: u16Destination port requested by policy.
protocol: EgressProtocolProtocol hint for adapter translation.
Implementations§
Source§impl EgressTarget
impl EgressTarget
Sourcepub fn parse(input: impl AsRef<str>) -> Result<Self, AgentError>
pub fn parse(input: impl AsRef<str>) -> Result<Self, AgentError>
Parses and canonicalizes an egress target.
Accepted forms include example.com, example.com:443,
https://example.com, http://example.com:80,
tcp://example.com:443, and udp://resolver.example:53.
URL paths, credentials, query strings, fragments, wildcards, empty hosts,
and invalid ports are rejected because this value describes an egress
boundary rather than a fetch request.
Trait Implementations§
Source§impl Clone for EgressTarget
impl Clone for EgressTarget
Source§fn clone(&self) -> EgressTarget
fn clone(&self) -> EgressTarget
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 EgressTarget
impl Debug for EgressTarget
Source§impl<'de> Deserialize<'de> for EgressTarget
impl<'de> Deserialize<'de> for EgressTarget
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 EgressTarget
Source§impl Hash for EgressTarget
impl Hash for EgressTarget
Source§impl Ord for EgressTarget
impl Ord for EgressTarget
Source§fn cmp(&self, other: &EgressTarget) -> Ordering
fn cmp(&self, other: &EgressTarget) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EgressTarget
impl PartialEq for EgressTarget
Source§fn eq(&self, other: &EgressTarget) -> bool
fn eq(&self, other: &EgressTarget) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for EgressTarget
impl PartialOrd for EgressTarget
Source§impl Serialize for EgressTarget
impl Serialize for EgressTarget
impl StructuralPartialEq for EgressTarget
Auto Trait Implementations§
impl Freeze for EgressTarget
impl RefUnwindSafe for EgressTarget
impl Send for EgressTarget
impl Sync for EgressTarget
impl Unpin for EgressTarget
impl UnsafeUnpin for EgressTarget
impl UnwindSafe for EgressTarget
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.