pub trait XMatch<'l> {
type Out: Copy;
// Required method
fn go<M>(
&self,
direction: &M,
ll_line: &'l LLLine,
) -> Vec<(Self::Out, ToIdx)>
where M: XDirection<'l>;
}Expand description
Examples: Attr, AttrEq
Required Associated Types§
Sourcetype Out: Copy
type Out: Copy
Usually must be Copy so it’s compatible with any multi-matchers. The Out must be copied in the event of “cartesian” product scenarios where multi-matchers return multiple combinations of their inner matchers’ Out.
This usually isn’t a big deal to implement, since most Out values will be a reference
like &'l Tag, and all references in Rust are Copy.
Required Methods§
fn go<M>(&self, direction: &M, ll_line: &'l LLLine) -> Vec<(Self::Out, ToIdx)>where
M: XDirection<'l>,
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.