Skip to main content

ContBarrier

Struct ContBarrier 

Source
pub struct ContBarrier<'a> { /* private fields */ }
Expand description

A continuation barrier. Escape procedures created within a continuation barrier cannot be called within another barrier.

This structure also contains the dynamic state of the running program including winders, exception handlers, continuation marks, and parameters.

Implementations§

Source§

impl<'a> ContBarrier<'a>

Source

pub fn new() -> Self

Source

pub fn save(&self) -> SavedDynamicState

Source

pub fn add_param(&mut self, key: impl Into<Symbol>, val: &'a mut impl Any)

Source

pub fn get_param<'b>( &'b mut self, key: impl Into<Symbol>, ) -> Option<&'b mut dyn Any>

Source

pub fn get_params_disjoint<'b, const N: usize>( &'b mut self, keys: [&Symbol; N], ) -> [Option<&'b mut dyn Any>; N]

Source

pub fn iter_params<'b>( &'b mut self, ) -> impl Iterator<Item = (Symbol, &'b mut dyn Any)>

Source

pub fn child_barrier<'b, 'c, const N: usize>( &'b mut self, params: [impl Into<Symbol>; N], ) -> ([Option<&'b mut dyn Any>; N], ContBarrier<'c>)
where 'b: 'c,

Constructs a child barrier from the current barrier, extracting an array of parameters that are not automatically passed onto the child.

Source

pub fn current_exception_handler(&self) -> Option<Procedure>

Source

pub fn current_input_port(&self) -> Port

Source

pub fn current_output_port(&self) -> Port

Trait Implementations§

Source§

impl Default for ContBarrier<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'a, 'b, 'c> From<&'b mut ContBarrier<'a>> for ContBarrier<'c>
where 'b: 'c,

Source§

fn from(value: &'b mut ContBarrier<'a>) -> Self

Converts to this type from the input type.
Source§

impl From<SavedDynamicState> for ContBarrier<'_>

Source§

fn from(value: SavedDynamicState) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for ContBarrier<'a>

§

impl<'a> !RefUnwindSafe for ContBarrier<'a>

§

impl<'a> !Send for ContBarrier<'a>

§

impl<'a> !Sync for ContBarrier<'a>

§

impl<'a> Unpin for ContBarrier<'a>

§

impl<'a> UnsafeUnpin for ContBarrier<'a>

§

impl<'a> !UnwindSafe for ContBarrier<'a>

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, U> ExactFrom<T> for U
where U: TryFrom<T>,

Source§

fn exact_from(value: T) -> U

Source§

impl<T, U> ExactInto<U> for T
where U: ExactFrom<T>,

Source§

fn exact_into(self) -> U

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> OverflowingInto<U> for T
where U: OverflowingFrom<T>,

Source§

impl<T, U> RoundingInto<U> for T
where U: RoundingFrom<T>,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> SaturatingInto<U> for T
where U: SaturatingFrom<T>,

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

Source§

impl<T, U> WrappingInto<U> for T
where U: WrappingFrom<T>,

Source§

fn wrapping_into(self) -> U