Class

Trait Class 

Source
pub trait Class<T = char>: MapSource {
    // Required methods
    fn classify<'a>(
        &self,
        set: &'a RangeSet<T>,
    ) -> Self::Map<Mown<'a, RangeSet<T>>>;
    fn next_class(&self, token: &T) -> Self;
}
Expand description

Token class.

Required Methods§

Source

fn classify<'a>(&self, set: &'a RangeSet<T>) -> Self::Map<Mown<'a, RangeSet<T>>>

Classify the given token set.

The output is a partition of the input set, where each member of the partition is associated to a different class.

Source

fn next_class(&self, token: &T) -> Self

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.

Implementations on Foreign Types§

Source§

impl<T> Class<T> for ()

Source§

fn classify<'a>(&self, set: &'a RangeSet<T>) -> Self::Map<Mown<'a, RangeSet<T>>>

Source§

fn next_class(&self, _token: &T) -> Self

Implementors§