pub struct SocketsAllow {
pub host: Option<String>,
pub cidr: Option<String>,
pub ports: Option<Vec<u16>>,
pub protocols: Vec<SocketProtocol>,
}Expand description
One entry in a [std.capabilities."wasi:sockets"].allow array.
Exactly one of host or cidr is required. ports is optional: omit it
(or set it absent) to declare a ceiling over any port; provide a
non-empty list to restrict to specific ports. protocols defaults to
["tcp", "udp"] (both).
Fields§
§host: Option<String>Exact host, *.suffix wildcard, or * for any. Mutually
exclusive with cidr.
cidr: Option<String>CIDR (IPv4 or IPv6). Mutually exclusive with host.
ports: Option<Vec<u16>>Ports this rule applies to. None (omitted) means any port.
protocols: Vec<SocketProtocol>Protocols this rule applies to. Defaults to both.
Trait Implementations§
Source§impl Clone for SocketsAllow
impl Clone for SocketsAllow
Source§fn clone(&self) -> SocketsAllow
fn clone(&self) -> SocketsAllow
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 SocketsAllow
impl Debug for SocketsAllow
Source§impl<'de> Deserialize<'de> for SocketsAllow
impl<'de> Deserialize<'de> for SocketsAllow
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
Auto Trait Implementations§
impl Freeze for SocketsAllow
impl RefUnwindSafe for SocketsAllow
impl Send for SocketsAllow
impl Sync for SocketsAllow
impl Unpin for SocketsAllow
impl UnsafeUnpin for SocketsAllow
impl UnwindSafe for SocketsAllow
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