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§
Sourcefn root(&self) -> &RootContext
fn root(&self) -> &RootContext
Get the root context object
Sourcefn marked_nodes(&self, marker: Marker) -> impl Iterator<Item = GlobalNode> + '_
fn marked_nodes(&self, marker: Marker) -> impl Iterator<Item = GlobalNode> + '_
Returns an iterator over all objects marked with marker
.
Sourcefn nodes_marked_any_way(
&self,
marker: Marker,
) -> impl Iterator<Item = GlobalNode> + '_
fn nodes_marked_any_way( &self, marker: Marker, ) -> impl Iterator<Item = GlobalNode> + '_
All nodes with this marker, be that via type or directly
Sourcefn nodes_marked_via_type(
&self,
marker: Marker,
) -> impl Iterator<Item = GlobalNode> + '_
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.