pub trait Tracks {
    // Required methods
    fn try_track(&self, idx: i64) -> Option<Span>;
    fn try_range(&self) -> (Option<i64>, Option<i64>);

    // Provided method
    fn track(&self, idx: i64) -> Span { ... }
}
Expand description

A set of tracks.

Required Methods§

source

fn try_track(&self, idx: i64) -> Option<Span>

The track at the given index.

source

fn try_range(&self) -> (Option<i64>, Option<i64>)

The range of valid indices, as a tuple (min, max).

If there is no min/max index, implementers should return None.

Provided Methods§

source

fn track(&self, idx: i64) -> Span

The track at the given index, panicking if the index is out of bounds.

Implementors§