ConstructData

Struct ConstructData 

Source
pub struct ConstructData<'brand, J> { /* private fields */ }

Implementations§

Source§

impl<'brand, J: Jet> ConstructData<'brand, J>

Source

pub fn new(arrow: Arrow<'brand>) -> Self

Constructs a new ConstructData from an (unfinalized) type arrow

Source

pub fn arrow(&self) -> &Arrow<'brand>

Accessor for the node’s arrow

Trait Implementations§

Source§

impl<'brand, J: Clone> Clone for ConstructData<'brand, J>

Source§

fn clone(&self) -> ConstructData<'brand, J>

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<'brand, J> CoreConstructible<'brand> for ConstructData<'brand, J>

Source§

fn iden(inference_context: &Context<'brand>) -> Self

Source§

fn unit(inference_context: &Context<'brand>) -> Self

Source§

fn injl(child: &Self) -> Self

Source§

fn injr(child: &Self) -> Self

Source§

fn take(child: &Self) -> Self

Source§

fn drop_(child: &Self) -> Self

Source§

fn comp(left: &Self, right: &Self) -> Result<Self, Error>

Source§

fn case(left: &Self, right: &Self) -> Result<Self, Error>

Source§

fn assertl(left: &Self, right: Cmr) -> Result<Self, Error>

Source§

fn assertr(left: Cmr, right: &Self) -> Result<Self, Error>

Source§

fn pair(left: &Self, right: &Self) -> Result<Self, Error>

Source§

fn fail(inference_context: &Context<'brand>, entropy: FailEntropy) -> Self

Source§

fn const_word(inference_context: &Context<'brand>, word: Word) -> Self

Source§

fn inference_context(&self) -> &Context<'brand>

Accessor for the type inference context used to create the object.
Source§

fn scribe(ctx: &Context<'brand>, value: &Value) -> Self

Create an expression that produces the given value. Read more
Source§

fn bit_false(inference_context: &Context<'brand>) -> Self

Create a DAG that takes any input and returns bit 0 as constant output. Read more
Source§

fn bit_true(inference_context: &Context<'brand>) -> Self

Create a DAG that takes any input and returns bit 1 as constant output. Read more
Source§

fn cond(left: &Self, right: &Self) -> Result<Self, Error>

Create a DAG that takes a bit and an input, such that the left child is evaluated on the input if the bit is 1 (if branch) and the right child is evaluated on the input otherwise (else branch). Read more
Source§

fn assert(child: &Self, hash: Cmr) -> Result<Self, Error>

Create a DAG that asserts that its child returns true, and fails otherwise. The hash identifies the assertion and is returned upon failure. Read more
Source§

fn not(child: &Self) -> Result<Self, Error>

Create a DAG that computes Boolean NOT of the child. Read more
Source§

fn and(left: &Self, right: &Self) -> Result<Self, Error>

Create a DAG that computes Boolean AND of the left and right child. Read more
Source§

fn or(left: &Self, right: &Self) -> Result<Self, Error>

Create a DAG that computes Boolean OR of the left and right. Read more
Source§

impl<'brand, J: Debug> Debug for ConstructData<'brand, J>

Source§

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

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

impl<'brand, J: Jet> DisconnectConstructible<'brand, Option<Arc<Node<Construct<'brand, J>>>>> for ConstructData<'brand, J>

Source§

fn disconnect( left: &Self, right: &Option<Arc<ConstructNode<'brand, J>>>, ) -> Result<Self, Error>

Source§

impl<'brand, J: Jet> JetConstructible<'brand, J> for ConstructData<'brand, J>

Source§

fn jet(inference_context: &Context<'brand>, jet: J) -> Self

Source§

impl<'brand, J> WitnessConstructible<'brand, Option<Value>> for ConstructData<'brand, J>

Source§

fn witness(inference_context: &Context<'brand>, _witness: Option<Value>) -> Self

Auto Trait Implementations§

§

impl<'brand, J> Freeze for ConstructData<'brand, J>

§

impl<'brand, J> !RefUnwindSafe for ConstructData<'brand, J>

§

impl<'brand, J> Send for ConstructData<'brand, J>
where J: Send,

§

impl<'brand, J> Sync for ConstructData<'brand, J>
where J: Sync,

§

impl<'brand, J> Unpin for ConstructData<'brand, J>
where J: Unpin,

§

impl<'brand, J> !UnwindSafe for ConstructData<'brand, J>

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<'brand, J, X, W, T> Constructible<'brand, J, X, W> for T
where T: DisconnectConstructible<'brand, X> + JetConstructible<'brand, J> + WitnessConstructible<'brand, W> + CoreConstructible<'brand>,

Source§

fn from_inner( inference_context: &Context<'brand>, inner: Inner<&Self, J, &X, W>, ) -> Result<Self, Error>

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

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

Source§

fn vzip(self) -> V