Position

Trait Position 

Source
pub trait Position:
    Debug
    + Clone
    + Default
    + PartialEq {
    // Required method
    fn offset_range(&self, local_range: Range<usize>) -> Option<Range<Self>>;
}
Expand description

Implemented by types usable as Position generic type parameter in this library.

Required Methods§

Source

fn offset_range(&self, local_range: Range<usize>) -> Option<Range<Self>>

Adds self to both limits of local_range and returns the result in Some.
If this operation does not make sense, None is returned instead.

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 Position for ()

Source§

fn offset_range(&self, _local_range: Range<usize>) -> Option<Range<Self>>

Source§

impl Position for usize

Source§

fn offset_range(&self, local_range: Range<usize>) -> Option<Range<Self>>

Implementors§