Skip to main content

RanMapped

Struct RanMapped 

Source
pub struct RanMapped<G, H, A, B, T, F>
where G: HKT, H: HKT,
{ /* private fields */ }
Expand description

A Ran with a mapped input, produced by ran_fmap.

Trait Implementations§

Source§

impl<G, H, A, B, T, F> Ran<G, H> for RanMapped<G, H, A, B, T, F>
where G: HKT, H: HKT, T: Ran<G, H, Input = A>, F: Fn(A) -> B,

Source§

type Input = B

The input type (corresponds to A in ∀R. (A → G R) → H R).
Source§

fn run_ran<R>(&self, k: impl Fn(B) -> <G as HKT>::Of<R>) -> <H as HKT>::Of<R>

Run the Ran: given a continuation k: A → G R, produce H R.

Auto Trait Implementations§

§

impl<G, H, A, B, T, F> Freeze for RanMapped<G, H, A, B, T, F>
where T: Freeze, F: Freeze,

§

impl<G, H, A, B, T, F> RefUnwindSafe for RanMapped<G, H, A, B, T, F>

§

impl<G, H, A, B, T, F> Send for RanMapped<G, H, A, B, T, F>
where T: Send, F: Send, G: Send, H: Send, A: Send, B: Send,

§

impl<G, H, A, B, T, F> Sync for RanMapped<G, H, A, B, T, F>
where T: Sync, F: Sync, G: Sync, H: Sync, A: Sync, B: Sync,

§

impl<G, H, A, B, T, F> Unpin for RanMapped<G, H, A, B, T, F>
where T: Unpin, F: Unpin, G: Unpin, H: Unpin, A: Unpin, B: Unpin,

§

impl<G, H, A, B, T, F> UnsafeUnpin for RanMapped<G, H, A, B, T, F>
where T: UnsafeUnpin, F: UnsafeUnpin,

§

impl<G, H, A, B, T, F> UnwindSafe for RanMapped<G, H, A, B, T, F>

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> 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, 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.