Trait MoveOffset

Source
pub trait MoveOffset: Sized {
    // Required methods
    fn checked_move_offset(self, offset: isize) -> Option<Self>;
    fn detailed_diff(self, other: Self) -> (Self, Ordering);
    fn plain_diff(self, other: Self) -> Self;
}

Required Methods§

Source

fn checked_move_offset(self, offset: isize) -> Option<Self>

Source

fn detailed_diff(self, other: Self) -> (Self, Ordering)

Source

fn plain_diff(self, other: Self) -> 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 MoveOffset for usize

Source§

fn detailed_diff(self, other: Self) -> (Self, Ordering)

returns (distance, is_pos)

Source§

fn plain_diff(self, other: Self) -> Self

Source§

fn checked_move_offset(self, offset: isize) -> Option<Self>

Implementors§