Struct ConstructData

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

Implementations§

Source§

impl<J: Jet> ConstructData<J>

Source

pub fn new(arrow: Arrow) -> Self

Constructs a new ConstructData from an (unfinalized) type arrow

Source

pub fn arrow(&self) -> &Arrow

Accessor for the node’s arrow

Trait Implementations§

Source§

impl<J: Clone> Clone for ConstructData<J>

Source§

fn clone(&self) -> ConstructData<J>

Returns a copy 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<J> CoreConstructible for ConstructData<J>

Source§

fn iden(inference_context: &Context) -> Self

Source§

fn unit(inference_context: &Context) -> 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, entropy: FailEntropy) -> Self

Source§

fn const_word(inference_context: &Context, word: Value) -> Self

Source§

fn inference_context(&self) -> &Context

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

fn scribe(inference_context: &Context, value: &Value) -> Self

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

fn bit_false(inference_context: &Context) -> Self

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

fn bit_true(inference_context: &Context) -> 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<J: Debug> Debug for ConstructData<J>

Source§

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

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

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

Source§

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

Source§

impl<J: Jet> JetConstructible<J> for ConstructData<J>

Source§

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

Source§

impl<J> WitnessConstructible<NoWitness> for ConstructData<J>

Source§

fn witness(inference_context: &Context, witness: NoWitness) -> Self

Auto Trait Implementations§

§

impl<J> Freeze for ConstructData<J>

§

impl<J> RefUnwindSafe for ConstructData<J>
where J: RefUnwindSafe,

§

impl<J> !Send for ConstructData<J>

§

impl<J> !Sync for ConstructData<J>

§

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

§

impl<J> UnwindSafe for ConstructData<J>
where J: UnwindSafe,

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, dst: *mut u8)

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

impl<J, X, W, T> Constructible<J, X, W> for T

Source§

fn from_inner( inference_context: &Context, 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