Skip to main content

ClassMarker

Trait ClassMarker 

Source
pub trait ClassMarker: Clone {
    // Required methods
    fn insert_pos(&self, orig_len: usize) -> usize;
    fn group_rank(&self) -> usize;
    fn forbids_step(&self) -> bool;
}
Expand description

Shared behaviour of the ClassToken / ClassLatent position markers, letting one generic helper place either kind.

Required Methods§

Source

fn insert_pos(&self, orig_len: usize) -> usize

Insertion index measured against the original sequence length orig_len.

Source

fn group_rank(&self) -> usize

Tie-break rank among markers sharing an index (Start<Middle<End<Custom).

Source

fn forbids_step(&self) -> bool

Whether this marker is incompatible with single-token step() (Middle/End create positions a per-token recurrence cannot reproduce).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§