Skip to main content

AnnotationFn

Trait AnnotationFn 

Source
pub trait AnnotationFn<N = BoundExpression>: Fn(&N) -> Vec<Self::Annotation> {
    type Annotation: Annotation;
}
Expand description

Computes annotations for an expression node, defaulting to bound expressions.

Required Associated Types§

Source

type Annotation: Annotation

The annotation attached to a node.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<N, A, F> AnnotationFn<N> for F
where A: Annotation, F: Fn(&N) -> Vec<A>,