Skip to main content

Isolation

Struct Isolation 

Source
pub struct Isolation {
    pub tier: Tier,
    pub confinement: Confinement,
    pub worker: Option<Worker>,
}
Expand description

What actually confined one step (US-0508).

§Why this is recorded rather than inferred

A plan says which tier a tool needs, and a tier says what it can enforce on this host. Neither says what happened. A host that could not deliver what the plan assumed is exactly the case worth catching — a Profile C flow that silently ran in-process is a flow whose reproducibility claim is false — so the tier that ran the step writes down what it was and what it enforced, and the ledger keeps that beside the grant delta.

§Absent is not the same as none

The ledger holds an Option<Isolation>, and the two cases are different facts. None means the runner did not say: nothing is claimed, and a reviewer knows to go and ask. Some carrying Confinement::NONE means the step ran with nothing enforced, which is a claim, and one somebody may have to act on. Rounding either into the other would lose the difference between an unaudited step and an unconfined one.

Fields§

§tier: Tier

The tier that actually ran the step.

§confinement: Confinement

What that tier actually enforced, per domain, on the host it ran on.

§worker: Option<Worker>

The reused worker that served it, where one did (US-0909).

None is a child of its own: one process, one call, gone afterwards. Some means a warm worker served it, and names which — because “the tool ran in a subprocess” stops being the whole answer once a subprocess serves more than one step. Two steps confined identically and served by the same worker are a different fact from two steps that each had a process to themselves, and only one of them can be investigated by asking what else that worker did.

Skipped when absent, so a cold child’s entry encodes exactly as it did before warm workers existed.

Implementations§

Source§

impl Isolation

Source

pub const fn new(tier: Tier, confinement: Confinement) -> Self

A step that ran in tier, which enforced confinement.

In a child of its own: served_by is what says a reused worker ran it instead.

Source

pub const fn served_by(self, worker: Worker) -> Self

Record that a reused worker served this step (US-0909).

Source

pub const fn was_warm(&self) -> bool

Whether a reused worker served it, rather than a child of its own.

Source

pub const fn unconfined(tier: Tier) -> Self

A step that ran in tier with nothing enforced at all.

The record a trusted in-process tool leaves when nothing stands between it and the machine. Written down rather than omitted: see the type documentation.

Source

pub const fn is_virtualising(&self) -> bool

Whether the tier that ran it virtualises the machine — what Profile C asks for.

Source

pub fn enforces_nothing(&self) -> bool

Whether nothing at all was enforced.

Source

pub fn is_kernel_enforced(&self) -> bool

Whether every domain was refused by the kernel rather than by the host.

The question a reviewer asking “was this confined, or merely asked nicely?” is actually asking.

Trait Implementations§

Source§

impl Clone for Isolation

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Isolation

Source§

impl Debug for Isolation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Isolation

Source§

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 Isolation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

process (fs=kernel net=none proc=interposed env=kernel secret=interposed), and where a warm worker served it, which one.

Source§

impl Eq for Isolation

Source§

impl PartialEq for Isolation

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Isolation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Isolation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Canonical for T
where T: Serialize + ?Sized,

Source§

fn canonical_bytes(&self) -> Result<Vec<u8>, CanonicalError>

The canonical CBOR encoding of this value.
Source§

fn digest(&self) -> Result<Digest, CanonicalError>

The blake3 digest of this value’s canonical encoding.
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V