paralegal_policy

Trait Context

Source
pub trait Context {
    // Required methods
    fn root(&self) -> &RootContext;
    fn marked_nodes(
        &self,
        marker: Marker,
    ) -> impl Iterator<Item = GlobalNode> + '_;
    fn nodes_marked_any_way(
        &self,
        marker: Marker,
    ) -> impl Iterator<Item = GlobalNode> + '_;
    fn nodes_marked_via_type(
        &self,
        marker: Marker,
    ) -> impl Iterator<Item = GlobalNode> + '_;
}
Expand description

Actions that behave differently depending on the context

Required Methods§

Source

fn root(&self) -> &RootContext

Get the root context object

Source

fn marked_nodes(&self, marker: Marker) -> impl Iterator<Item = GlobalNode> + '_

Returns an iterator over all objects marked with marker.

Source

fn nodes_marked_any_way( &self, marker: Marker, ) -> impl Iterator<Item = GlobalNode> + '_

All nodes with this marker, be that via type or directly

Source

fn nodes_marked_via_type( &self, marker: Marker, ) -> impl Iterator<Item = GlobalNode> + '_

All nodes that have this marker through a type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§