Trait cairo_lang_casm::ap_change::ApplyApChange

source ·
pub trait ApplyApChange: Sized {
    // Required methods
    fn apply_known_ap_change(self, ap_change: usize) -> Option<Self>;
    fn can_apply_unknown(&self) -> bool;

    // Provided methods
    fn apply_ap_change(self, ap_change: ApChange) -> Result<Self, ApChangeError> { ... }
    fn unchecked_apply_known_ap_change(self, ap_change: usize) -> Self { ... }
}
Expand description

Trait for applying ap changes.

Required Methods§

source

fn apply_known_ap_change(self, ap_change: usize) -> Option<Self>

Attempts to apply ap change, fail on overflow only.

source

fn can_apply_unknown(&self) -> bool

Can unknown ap change be applied.

Provided Methods§

source

fn apply_ap_change(self, ap_change: ApChange) -> Result<Self, ApChangeError>

Attempts to apply ap change.

source

fn unchecked_apply_known_ap_change(self, ap_change: usize) -> Self

Same as Self::apply_known_ap_change but unchecked.

Object Safety§

This trait is not object safe.

Implementors§