Enum tskit::error::TskitError
source · pub enum TskitError {
RangeError(String),
ValueError {
got: String,
expected: String,
},
IndexError,
NotTrackingSamples,
ErrorCode {
code: i32,
},
MetadataError {
value: MetadataError,
},
LibraryError(String),
}
Variants§
RangeError(String)
Returned when conversion attempts fail
ValueError
Used when bad input is encountered.
IndexError
Used when array access is out of range. Typically, this is used when accessing arrays allocated on the C side.
NotTrackingSamples
Raised when samples are requested from
crate::Tree
objects, but sample lists are
not being updated.
ErrorCode
Wrapper around tskit C API error codes.
MetadataError
Fields
§
value: MetadataError
The redirected error
A redirection of crate::metadata::MetadataError
LibraryError(String)
General error variant
Trait Implementations§
source§impl Debug for TskitError
impl Debug for TskitError
source§impl Display for TskitError
impl Display for TskitError
source§impl Error for TskitError
impl Error for TskitError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<MetadataError> for TskitError
impl From<MetadataError> for TskitError
source§fn from(source: MetadataError) -> Self
fn from(source: MetadataError) -> Self
Converts to this type from the input type.