mcrl2::aterm::aterm_container

Trait Markable

Source
pub trait Markable {
    // Required methods
    fn mark(&self, todo: Todo<'_>);
    fn contains_term(&self, term: &ATermRef<'_>) -> bool;
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

This trait should be used on all objects and containers related to storing unprotected terms.

Required Methods§

Source

fn mark(&self, todo: Todo<'_>)

Marks all the ATermRefs to prevent them from being garbage collected.

Source

fn contains_term(&self, term: &ATermRef<'_>) -> bool

Should return true iff the given term is contained in the object. Used for runtime checks.

Source

fn len(&self) -> usize

Returns the number of terms in the instance, used to delay garbage collection.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true iff the container is empty.

Implementations on Foreign Types§

Source§

impl<T: Markable> Markable for Vec<T>

Source§

fn mark(&self, todo: Pin<&mut term_mark_stack>)

Source§

fn contains_term(&self, term: &ATermRef<'_>) -> bool

Source§

fn len(&self) -> usize

Implementors§