Skip to main content

SternBrocotTree

Trait SternBrocotTree 

Source
pub trait SternBrocotTree: From<URational<Self::T>> + FromIterator<Self::T> {
    type T: Unsigned;

    // Required methods
    fn root() -> Self;
    fn is_root(&self) -> bool;
    fn eval(&self) -> URational<Self::T>;
    fn down_left(&mut self, count: Self::T);
    fn down_right(&mut self, count: Self::T);
    fn up(&mut self, count: Self::T) -> Self::T;
}

Required Associated Types§

Required Methods§

Source

fn root() -> Self

Source

fn is_root(&self) -> bool

Source

fn eval(&self) -> URational<Self::T>

Source

fn down_left(&mut self, count: Self::T)

Source

fn down_right(&mut self, count: Self::T)

Source

fn up(&mut self, count: Self::T) -> Self::T

Returns the remaining count after moving up.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T> SternBrocotTree for SbtNode<T>
where T: Unsigned,

Source§

type T = T

Source§

impl<T> SternBrocotTree for SbtPath<T>
where T: Unsigned,

Source§

type T = T