Skip to main content

Handlers

Struct Handlers 

Source
pub struct Handlers {
    pub conditions: HashMap<Condition, Handler>,
    pub stack: Vec<(HashMap<Condition, Handler>, Option<AbendExit>)>,
    pub abend: Option<AbendExit>,
}
Expand description

HANDLE CONDITION, IGNORE CONDITION and HANDLE ABEND, which belong to the logical level: every program CALLed at it shares them (C234).

Fields§

§conditions: HashMap<Condition, Handler>§stack: Vec<(HashMap<Condition, Handler>, Option<AbendExit>)>

What each PUSH HANDLE at this logical level suspended.

§abend: Option<AbendExit>

Implementations§

Source§

impl Handlers

Source

pub fn push(&mut self)

PUSH HANDLE: suspends HANDLE CONDITION, IGNORE CONDITION and HANDLE ABEND until pop.

Source

pub fn pop(&mut self) -> bool

POP HANDLE: false when no PUSH HANDLE at this logical level is left to undo.

Source

pub fn lend(&mut self, pushes: bool) -> Handlers

The handlers a CALLed program starts with: the level’s, which a dynamic CALL first suspends with the PUSH HANDLE of CBLPSHPOP(ON) (C234).

Source

pub fn xctl(&mut self) -> Handlers

The handlers the program XCTL starts has: the level’s HANDLE ABEND exit and PUSH HANDLE stack, each exit the stack holds kept, and no HANDLE CONDITION or IGNORE CONDITION, which belong to the program XCTL releases, pushed or not (C146).

Source

pub fn take_back(&mut self, callee: &mut Handlers, pops: bool)

Takes the level’s handlers back from a CALLed program that has ended, as it left them; with pops, for a dynamic CALL it returned from, the POP HANDLE that undoes the CALL’s PUSH, which changes nothing when no PUSH is left (C234).

Trait Implementations§

Source§

impl Clone for Handlers

Source§

fn clone(&self) -> Handlers

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
Source§

impl Debug for Handlers

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Handlers

Source§

fn default() -> Handlers

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

Auto Trait Implementations§

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> 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<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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.