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>
impl<'a> ContBarrier<'a>
pub fn new() -> Self
pub fn save(&self) -> SavedDynamicState
pub fn add_param(&mut self, key: impl Into<Symbol>, val: &'a mut impl Any)
pub fn get_param<'b>( &'b mut self, key: impl Into<Symbol>, ) -> Option<&'b mut dyn Any>
pub fn get_params_disjoint<'b, const N: usize>( &'b mut self, keys: [&Symbol; N], ) -> [Option<&'b mut dyn Any>; N]
pub fn iter_params<'b>( &'b mut self, ) -> impl Iterator<Item = (Symbol, &'b mut dyn Any)>
Sourcepub 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,
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.
pub fn current_exception_handler(&self) -> Option<Procedure>
pub fn current_input_port(&self) -> Port
pub fn current_output_port(&self) -> Port
Trait Implementations§
Source§impl Default for ContBarrier<'_>
impl Default for ContBarrier<'_>
Source§impl<'a, 'b, 'c> From<&'b mut ContBarrier<'a>> for ContBarrier<'c>where
'b: 'c,
impl<'a, 'b, 'c> From<&'b mut ContBarrier<'a>> for ContBarrier<'c>where
'b: 'c,
Source§fn from(value: &'b mut ContBarrier<'a>) -> Self
fn from(value: &'b mut ContBarrier<'a>) -> Self
Converts to this type from the input type.
Source§impl From<SavedDynamicState> for ContBarrier<'_>
impl From<SavedDynamicState> for ContBarrier<'_>
Source§fn from(value: SavedDynamicState) -> Self
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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