Skip to main content

OptionLambda

Struct OptionLambda 

Source
pub struct OptionLambda<A: IVm>(/* private fields */);
Expand description

A region is open and no receiver is live: the state after a ?.() node, a?.(...b), or a |() or |?.() step inside a region. Its steps are |() (call) and |. (dot); no |?.(), and no |!() — there is no receiver for either to justify.

Implementations§

Source§

impl<A: IVm> OptionLambda<A>

Source

pub fn end(self) -> Result<Any<A>, Any<A>>

No continuation: the region closes, a skipped chain is undefined.

Source

pub fn call( self, args: impl FnOnce() -> Result<Any<A>, Any<A>>, ) -> OptionLambda<A>

|(): call the current value, inside the region.

Source

pub fn dot( self, key: impl FnOnce() -> Result<Any<A>, Any<A>>, ) -> OptionPropertyLambda<A>

|.: a property of the current value, inside the region; the value becomes the receiver.

Auto Trait Implementations§

§

impl<A> Freeze for OptionLambda<A>
where A: Freeze,

§

impl<A> RefUnwindSafe for OptionLambda<A>
where A: RefUnwindSafe,

§

impl<A> Send for OptionLambda<A>
where A: Send,

§

impl<A> Sync for OptionLambda<A>
where A: Sync,

§

impl<A> Unpin for OptionLambda<A>
where A: Unpin,

§

impl<A> UnsafeUnpin for OptionLambda<A>
where A: UnsafeUnpin,

§

impl<A> UnwindSafe for OptionLambda<A>
where A: 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> 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> ToAny for T

Source§

fn to_any<A: IVm>(self) -> Any<A>
where Self: Into<Unpacked<A>>,

Source§

impl<T> ToArray for T

Source§

fn to_array<A: IVm>(self) -> Array<A>
where Self: Sized + IntoIterator<Item = Any<A>>,

Source§

impl<T> ToObject for T

Source§

fn to_object<A: IVm>(self) -> Object<A>
where Self: Sized + IntoIterator<Item = Property<A>>,

Source§

impl<T> ToString for T

Source§

fn try_to_string<A: IVm>(self) -> Result<String<A>, Any<A>>
where Self: Sized + IntoIterator<Item = Result<u16, Any<A>>>,

Source§

fn to_string<A: IVm>(self) -> String<A>
where Self: Sized + IntoIterator<Item = u16>,

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.