Skip to main content

Value

Enum Value 

Source
pub enum Value {
Show 38 variants Null, Bool(bool), I64(i64), U64(u64), F64(f64), String(String), Iri(String), Blank(String), Prefixed(String, String), Var(String), List(Vec<Value>), Record(BTreeMap<String, Value>), Triple(Box<Value>, Box<Value>, Box<Value>), Reified { s: Box<Value>, p: Box<Value>, o: Box<Value>, r: Box<Value>, }, Receipt, Ok(Box<Value>), Err(Box<Value>), Instant(Instant), Duration(Duration), Quantity(Quantity), Frame(Frame), Pose(Pose), Transform(Transform), FieldRef(FieldRef), MaterialRef(MaterialRef), TensorRef(TensorRef), GeometryRef(GeometryRef), AssetRef(AssetRef), WorldLine(WorldLine), QuinRef(QuinRef), Enum(EnumValue), Lambda { params: Vec<String>, body: Box<Expr>, }, SpeciesRef(SpeciesRef), Mixture(Mixture), Conservation(ConservationResult), Causal(CausalRelation), DisclosureDenied { capability: String, reason: String, }, DisclosureBoundary(DisclosureBoundary),
}

Variants§

§

Null

§

Bool(bool)

§

I64(i64)

§

U64(u64)

§

F64(f64)

§

String(String)

§

Iri(String)

§

Blank(String)

§

Prefixed(String, String)

§

Var(String)

§

List(Vec<Value>)

§

Record(BTreeMap<String, Value>)

§

Triple(Box<Value>, Box<Value>, Box<Value>)

§

Reified

§

Receipt

§

Ok(Box<Value>)

§

Err(Box<Value>)

§

Instant(Instant)

A point in time with scale, exact secs+nanos, and optional seal (T1).

§

Duration(Duration)

An exact duration: secs + nanos (T2).

§

Quantity(Quantity)

A physical quantity with a required unit IRI (T3).

§

Frame(Frame)

A reference frame: origin + basis (T4).

§

Pose(Pose)

A pose within a frame (T4).

§

Transform(Transform)

A transform: translate/rotate/scale/skew (T4).

§

FieldRef(FieldRef)

An opaque handle to a sampled field (T5).

§

MaterialRef(MaterialRef)

An opaque handle to a material signature (T5).

§

TensorRef(TensorRef)

An opaque handle to a 10D tensor on the host (T52).

§

GeometryRef(GeometryRef)

An opaque handle to a geometry asset on the host (T52).

§

AssetRef(AssetRef)

An opaque handle to a digital asset on the host (T52).

§

WorldLine(WorldLine)

A worldline: continuant through Instant × Pose (T6).

§

QuinRef(QuinRef)

An opaque 48-byte handle to a Super-Quin (T7). Scripts do not see the raw s/p/o/c/metadata/parity fields.

§

Enum(EnumValue)

A user-defined enum value (T9).

§

Lambda

Non-capturing lambda (body is AST; eval uses a fresh env of params only).

Fields

§params: Vec<String>
§body: Box<Expr>
§

SpeciesRef(SpeciesRef)

A chemical species reference (T33).

§

Mixture(Mixture)

A mixture of chemical species with composition data (T33).

§

Conservation(ConservationResult)

A conservation law check result (T34).

§

Causal(CausalRelation)

A causal relation between two events (T35).

§

DisclosureDenied

A credentialed disclosure refusal (T55). The agent/host refused to disclose content because the requester lacks the required capability, consent, or authority. This is a first-class rights enforcement value, not a “file not found” error.

Fields

§capability: String
§reason: String
§

DisclosureBoundary(DisclosureBoundary)

Four-bit disclosure boundary (T56). Each bit is independent: publication, replication, agency, exfiltration.

Implementations§

Source§

impl Value

Source

pub fn is_truthy(&self) -> bool

true when truthy.

Source

pub fn as_f64(&self) -> Option<f64>

f64 form.

Source

pub fn as_i64(&self) -> Option<i64>

i64 form.

Source

pub fn as_str(&self) -> Option<&str>

Extract a string slice if this value is a String or Iri.

Source

pub fn as_instant(&self) -> Option<&Instant>

Extract an Instant if this value is one.

Source

pub fn as_duration(&self) -> Option<&Duration>

Extract a Duration if this value is one.

Source

pub fn as_quantity(&self) -> Option<&Quantity>

Extract a Quantity if this value is one.

Source

pub fn as_frame(&self) -> Option<&Frame>

Extract a Frame if this value is one.

Source

pub fn as_pose(&self) -> Option<&Pose>

Extract a Pose if this value is one.

Source

pub fn as_transform(&self) -> Option<&Transform>

Extract a Transform if this value is one.

Source

pub fn as_field_ref(&self) -> Option<&FieldRef>

Extract a FieldRef if this value is one.

Source

pub fn as_material_ref(&self) -> Option<&MaterialRef>

Extract a MaterialRef if this value is one.

Source

pub fn as_tensor_ref(&self) -> Option<&TensorRef>

Extract a TensorRef if this value is one (T52).

Source

pub fn as_geometry_ref(&self) -> Option<&GeometryRef>

Extract a GeometryRef if this value is one (T52).

Source

pub fn as_asset_ref(&self) -> Option<&AssetRef>

Extract an AssetRef if this value is one (T52).

Source

pub fn as_worldline(&self) -> Option<&WorldLine>

Extract a WorldLine if this value is one.

Source

pub fn as_quin_ref(&self) -> Option<&QuinRef>

Extract a QuinRef if this value is one (T7).

Source

pub fn as_enum(&self) -> Option<&EnumValue>

Extract an EnumValue if this value is one (T9).

Source

pub fn as_species_ref(&self) -> Option<&SpeciesRef>

Extract a SpeciesRef if this value is one (T33).

Source

pub fn as_mixture(&self) -> Option<&Mixture>

Extract a Mixture if this value is one (T33).

Source

pub fn as_conservation(&self) -> Option<&ConservationResult>

Extract a ConservationResult if this value is one (T34).

Source

pub fn as_causal(&self) -> Option<CausalRelation>

Extract a CausalRelation if this value is one (T35).

Source

pub fn as_disclosure_denied(&self) -> Option<(&str, &str)>

Extract a DisclosureDenied if this value is one (T55). Returns (capability, reason).

Source

pub fn as_disclosure_boundary(&self) -> Option<&DisclosureBoundary>

Extract a DisclosureBoundary if this value is one (T56).

Trait Implementations§

Source§

impl Clone for Value

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 Value

Source§

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

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

impl Display for Value

Source§

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

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

impl PartialEq for Value

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 Value

Auto Trait Implementations§

§

impl Freeze for Value

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnsafeUnpin for Value

§

impl UnwindSafe for Value

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
§

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

§

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
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

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.

§

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

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> 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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,