pub enum NetworkPreset {
Unrestricted,
None,
Registries,
Dev,
}Expand description
Built-in network presets for common workloads.
Variants§
Unrestricted
Full internet access (no filtering). Default for backward compatibility.
None
No outbound network (FORWARD DROP, DNS only).
Registries
Package registries only (npm, crates.io, PyPI).
Dev
Developer preset: registries + GitHub + OpenAI + Anthropic APIs.
Implementations§
Source§impl NetworkPreset
impl NetworkPreset
Sourcepub fn is_unrestricted(&self) -> bool
pub fn is_unrestricted(&self) -> bool
Whether this preset means “allow everything” (no iptables filtering).
Sourcepub fn is_deny_all(&self) -> bool
pub fn is_deny_all(&self) -> bool
Whether this preset means “deny everything” (no allowlist entries).
Trait Implementations§
Source§impl Clone for NetworkPreset
impl Clone for NetworkPreset
Source§fn clone(&self) -> NetworkPreset
fn clone(&self) -> NetworkPreset
Returns a duplicate of the value. Read more
1.0.0 · 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 NetworkPreset
impl Debug for NetworkPreset
Source§impl<'de> Deserialize<'de> for NetworkPreset
impl<'de> Deserialize<'de> for NetworkPreset
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
Source§impl Display for NetworkPreset
impl Display for NetworkPreset
Source§impl FromStr for NetworkPreset
impl FromStr for NetworkPreset
Source§impl PartialEq for NetworkPreset
impl PartialEq for NetworkPreset
Source§impl Serialize for NetworkPreset
impl Serialize for NetworkPreset
impl Copy for NetworkPreset
impl Eq for NetworkPreset
impl StructuralPartialEq for NetworkPreset
Auto Trait Implementations§
impl Freeze for NetworkPreset
impl RefUnwindSafe for NetworkPreset
impl Send for NetworkPreset
impl Sync for NetworkPreset
impl Unpin for NetworkPreset
impl UnsafeUnpin for NetworkPreset
impl UnwindSafe for NetworkPreset
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> 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.