Skip to main content

ProblemImplementation

Trait ProblemImplementation 

Source
pub trait ProblemImplementation {
    // Required methods
    fn depth(&self) -> usize;
    fn get(&self, depth: usize) -> Option<&Cause>;
    fn get_mut(&mut self, depth: usize) -> Option<&mut Cause>;
    fn top(&self) -> Option<&Cause>;
    fn top_mut(&mut self) -> Option<&mut Cause>;
    fn root(&self) -> Option<&Cause>;
    fn root_mut(&mut self) -> Option<&mut Cause>;
    fn add_top(&mut self, cause: Cause);
    fn under(self, other: Self) -> Self;
    fn above(self, other: Self) -> Self;
}
Expand description

Problem implementation.

Required Methods§

Source

fn depth(&self) -> usize

The length of the causation chain.

Source

fn get(&self, depth: usize) -> Option<&Cause>

A cause in the causation chain.

Source

fn get_mut(&mut self, depth: usize) -> Option<&mut Cause>

A cause in the causation chain.

Source

fn top(&self) -> Option<&Cause>

The top of the causation chain.

Source

fn top_mut(&mut self) -> Option<&mut Cause>

The top of the causation chain.

Source

fn root(&self) -> Option<&Cause>

The root of the causation chain.

Source

fn root_mut(&mut self) -> Option<&mut Cause>

The root of the causation chain.

Source

fn add_top(&mut self, cause: Cause)

Adds to the top of the causation chain.

Source

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

Inserts our causation chain under that of the given one.

Source

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

Appends our causation chain above that of the given one.

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.

Implementors§

Source§

impl ProblemImplementation for Problem

Available on crate feature thin-vec only.