Skip to main content

Projected

Enum Projected 

Source
pub enum Projected {
    Null,
    Bool(bool),
    Int(i64),
    Float(f64),
    Text(String),
    DurationMs(u64),
    Quantity(Box<Projected>, String),
    Array(Vec<Projected>),
    Record(Vec<(String, Projected)>),
    Blob {
        hash: [u8; 32],
        size: u64,
        media_type: String,
        tainted: bool,
    },
    Env(String),
    Expr(&'static str),
}
Expand description

A redacted projection of a module’s value tree.

Both the JSON and the Protobuf projection render this tree. Building it once keeps the two from drifting, which matters because the redaction rules are security invariants and every renderer has to reproduce them exactly.

Variants§

§

Null

No value (a missing root or a dangling reference).

§

Bool(bool)

A boolean.

§

Int(i64)

A signed integer.

§

Float(f64)

A double-precision float.

§

Text(String)

Text with secret material already removed or replaced by the marker.

§

DurationMs(u64)

A duration in milliseconds.

§

Quantity(Box<Projected>, String)

A value with a unit: the inner value plus the unit’s name.

§

Array(Vec<Projected>)

Ordered list elements.

§

Record(Vec<(String, Projected)>)

A table, in canonical field order. Keys are already redacted.

§

Blob

A blob by identity. Payloads are never projected.

Fields

§hash: [u8; 32]

Blake3-256 of the payload.

§size: u64

Payload size in bytes.

§media_type: String

Media type, redacted when the blob is tainted.

§tainted: bool

Whether the blob carries secret-derived bytes.

§

Env(String)

An environment lookup, by name.

§

Expr(&'static str)

A node kind that has no data projection (an operator, a schema, a patch).

Trait Implementations§

Source§

impl Clone for Projected

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 Debug for Projected

Source§

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

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

impl PartialEq for Projected

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 StructuralPartialEq for Projected

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> 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> 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> Same for T

Source§

type Output = T

Should always be Self
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, 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.