pub enum Dimension {
Filesystem,
Network,
Exec,
}Expand description
The three trust dimensions an effect can touch. Kept deliberately small and fixed (design doc §7.2): every consequential effect a box can have on the world reduces to filesystem reach, network reach, or the ability to spawn arbitrary executables.
Variants§
Implementations§
Source§impl Dimension
impl Dimension
Sourcepub fn levels(self) -> &'static [Level]
pub fn levels(self) -> &'static [Level]
The levels that carry a meaning on this dimension.
The vocabulary is shared across dimensions deliberately — it is
small and the ordering is what matters — but sharing a
vocabulary is not sharing a meaning. Loopback says nothing
about a filesystem, and ReadWrite says nothing about a
process. Accepting one anyway does not merely look untidy: it
ranks, so it narrows, satisfies effect checks, and resolves to a
sandbox — all while naming nothing.
Sourcepub fn permits_level(self, level: Level) -> bool
pub fn permits_level(self, level: Level) -> bool
Does level mean anything on this dimension?
Trait Implementations§
impl Copy for Dimension
Source§impl<'de> Deserialize<'de> for Dimension
impl<'de> Deserialize<'de> for Dimension
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 Dimension
Source§impl Ord for Dimension
impl Ord for Dimension
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Dimension
impl PartialOrd for Dimension
impl StructuralPartialEq for Dimension
Auto Trait Implementations§
impl Freeze for Dimension
impl RefUnwindSafe for Dimension
impl Send for Dimension
impl Sync for Dimension
impl Unpin for Dimension
impl UnsafeUnpin for Dimension
impl UnwindSafe for Dimension
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.