riot_wrappers::error

Trait NegativeErrorExt

Source
pub trait NegativeErrorExt {
    type Out;

    // Required method
    fn negative_to_error(self) -> Result<Self::Out, NumericError>;
}

Required Associated Types§

Required Methods§

Source

fn negative_to_error(self) -> Result<Self::Out, NumericError>

Convert to a Result that is successful if the input value is zero or positive, or a NumericError if it is negative

Implementors§

Source§

impl<T> NegativeErrorExt for T
where T: Zero + PartialOrd + TryInto<isize>,

Source§

type Out = T