pub enum NetTarget {
AnyIp,
Cidr(IpCidr),
Host(String),
}Expand description
What a --net-allow / --net-deny rule targets at the IP layer.
Cidr covers both a bare IP literal (stored as a /32 or /128) and
an explicit CIDR range. Host is a hostname resolved via DNS at sandbox
start; it is only produced for --net-allow (deny rejects hostnames).
Variants§
AnyIp
Any destination IP (the :port / *:port / * form).
Cidr(IpCidr)
A literal IP or CIDR range. Matched by containment, no DNS.
Host(String)
A hostname, resolved to IPs at sandbox start (allow-only).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NetTarget
impl<'de> Deserialize<'de> for NetTarget
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 NetTarget
impl StructuralPartialEq for NetTarget
Auto Trait Implementations§
impl Freeze for NetTarget
impl RefUnwindSafe for NetTarget
impl Send for NetTarget
impl Sync for NetTarget
impl Unpin for NetTarget
impl UnsafeUnpin for NetTarget
impl UnwindSafe for NetTarget
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.