Skip to main content

FoundationDescriptor

Struct FoundationDescriptor 

Source
pub struct FoundationDescriptor {
Show 13 fields pub name: String, pub description: Option<String>, pub uses: Vec<String>, pub defines: Vec<(String, String)>, pub extends: Option<String>, pub numeric_domain: Option<String>, pub truth_domain: Option<String>, pub carrier: Vec<String>, pub strict_carrier: bool, pub truth_tables: Vec<(String, Vec<TruthTableRow>)>, pub experimental: bool, pub root: Option<String>, pub abits: Vec<(String, String)>,
}
Expand description

A foundation descriptor. Bundles a coherent set of root-construct interpretations. Selecting a foundation never silently rewires behaviour; the host operators always run, but the active-foundation tag is exposed via the foundation report so users can audit which foundation they are trusting.

Fields§

§name: String§description: Option<String>§uses: Vec<String>§defines: Vec<(String, String)>§extends: Option<String>§numeric_domain: Option<String>§truth_domain: Option<String>§carrier: Vec<String>

Carrier (issue #97, Section 2): the explicit set of values the foundation considers legal for queries and probability assignments. Each entry is stored as a string so enter_foundation can resolve symbolic constants (true, false, unknown) through env.symbol_prob at activation time. Numeric literals stay literal.

§strict_carrier: bool

When true, the active with-foundation scope enforces the carrier at runtime: out-of-carrier query results and probability assignments raise an E063 diagnostic instead of being silently clamped. Defaults to false for backward compatibility — declaring (carrier ...) alone is informational.

§truth_tables: Vec<(String, Vec<TruthTableRow>)>

Links-defined finite truth tables (issue #97, Section 3 of netkeep80’s punch-list). Each entry rebinds the named operator to the listed row set for the duration of (with-foundation ...). Inputs and outputs are stored as strings so enter_foundation can resolve symbolic truth constants (true, false, unknown) through env.symbol_prob at activation time. Numeric literals stay literal. A row whose inputs don’t match falls through to the previously installed op so partial tables remain backward- compatible.

§experimental: bool

Experimental MTC/anum foundation profile metadata (issue #97, Phase 9). When experimental is true the trust audit prints an [experimental] tag next to the foundation name so consumers can see it carries no stability guarantees. root is the foundation’s root symbol (e.g. for mtc-anum) and abits lists its foundational alphabet pairs (symbol → meaning).

§root: Option<String>§abits: Vec<(String, String)>

Trait Implementations§

Source§

impl Clone for FoundationDescriptor

Source§

fn clone(&self) -> FoundationDescriptor

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for FoundationDescriptor

Source§

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

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

impl Default for FoundationDescriptor

Source§

fn default() -> FoundationDescriptor

Returns the “default value” for a type. Read more
Source§

impl PartialEq for FoundationDescriptor

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FoundationDescriptor

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.