Skip to main content

Cons

Struct Cons 

Source
pub struct Cons<I, F, M> { /* private fields */ }
Expand description

Allows constructing a Block computation by the specified function.

Trait Implementations§

Source§

impl<I, F, M> Block for Cons<I, F, M>
where F: FnOnce(I) -> M + 'static, M: Process + 'static,

Source§

type Input = I

The input type of the computation.
Source§

type Output = <M as Process>::Item

The output type of the computation.
Source§

fn run(self, a: Self::Input) -> Run<Self::Input, Self::Output, Self>
where Self: Sized,

Run the computation by the specified input.
Source§

fn and_then<A>(self, other: A) -> AndThen<Self, A>
where Self: Sized + 'static, A: Block<Input = Self::Output> + 'static,

Bind the current computation with its continuation within the resulting computation.
Source§

fn into_boxed(self) -> BlockBox<Self::Input, Self::Output>
where Self: Sized + 'static,

Convert into a boxed value.
Source§

fn trace(self, msg: String) -> Trace<Self>
where Self: Sized,

👎Deprecated:

Use trace_block instead

Trace the computation.
Source§

impl<I: Clone, F: Clone, M: Clone> Clone for Cons<I, F, M>

Source§

fn clone(&self) -> Cons<I, F, M>

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

Auto Trait Implementations§

§

impl<I, F, M> Freeze for Cons<I, F, M>
where F: Freeze,

§

impl<I, F, M> RefUnwindSafe for Cons<I, F, M>

§

impl<I, F, M> Send for Cons<I, F, M>
where F: Send, I: Send, M: Send,

§

impl<I, F, M> Sync for Cons<I, F, M>
where F: Sync, I: Sync, M: Sync,

§

impl<I, F, M> Unpin for Cons<I, F, M>
where F: Unpin, I: Unpin, M: Unpin,

§

impl<I, F, M> UnsafeUnpin for Cons<I, F, M>
where F: UnsafeUnpin,

§

impl<I, F, M> UnwindSafe for Cons<I, F, M>
where F: UnwindSafe, I: UnwindSafe, M: 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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
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<A> IntoBlock for A
where A: Block,

Source§

type Block = A

The target computation.
Source§

type Input = <A as Block>::Input

The input type of the computation.
Source§

type Output = <A as Block>::Output

The output type of the computation.
Source§

fn into_block(self) -> <A as IntoBlock>::Block

Convert to the Block computation.
Source§

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

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