bio/stats/probs/errors.rs
1// Copyright 2019 Johannes Köster, University of Duisburg-Essen.
2// Licensed under the MIT license (http://opensource.org/licenses/MIT)
3// This file may not be copied, modified, or distributed
4// except according to those terms.
5
6//! Error definitions for the `probs` module.
7use thiserror::Error;
8
9#[derive(Error, Copy, Clone, PartialEq, PartialOrd, Debug, Serialize, Deserialize)]
10pub enum Error {
11 #[error("probabilty {} not in interval [0,1]", prob)]
12 InvalidProb { prob: f64 },
13}
14pub type Result<T, E = Error> = std::result::Result<T, E>;