Skip to main content

PartiallyInstantiableShaped

Trait PartiallyInstantiableShaped 

Source
pub trait PartiallyInstantiableShaped {
    type Infallible: InfallibleShaped;

    // Required methods
    fn instantiable(layer: PartiallyInstantiableInstantiable) -> Self;
    fn uninstantiable(
        layer: PartiallyInstantiableUninstantiable<Self::Infallible>,
    ) -> Self;
    fn elim<Output, State, InstantiableContinuation, UninstantiableContinuation>(
        &self,
        state: State,
        instantiable: InstantiableContinuation,
        uninstantiable: UninstantiableContinuation,
    ) -> Output
       where InstantiableContinuation: FnOnce(State, PartiallyInstantiableInstantiable) -> Output,
             UninstantiableContinuation: FnOnce(State, PartiallyInstantiableUninstantiable<&Self::Infallible>) -> Output;
}
Expand description

Field-wise shape interface for PartiallyInstantiable values.

Required Associated Types§

Source

type Infallible: InfallibleShaped

Field type slot Infallible for this shape.

Required Methods§

Source

fn instantiable(layer: PartiallyInstantiableInstantiable) -> Self

Construct the Instantiable case from its field-wise shape.

Source

fn uninstantiable( layer: PartiallyInstantiableUninstantiable<Self::Infallible>, ) -> Self

Construct the Uninstantiable case from its field-wise shape.

Source

fn elim<Output, State, InstantiableContinuation, UninstantiableContinuation>( &self, state: State, instantiable: InstantiableContinuation, uninstantiable: UninstantiableContinuation, ) -> Output
where InstantiableContinuation: FnOnce(State, PartiallyInstantiableInstantiable) -> Output, UninstantiableContinuation: FnOnce(State, PartiallyInstantiableUninstantiable<&Self::Infallible>) -> Output,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§