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
Fields
code: i32
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
sourceimpl Debug for TskitError
impl Debug for TskitError
sourceimpl Display for TskitError
impl Display for TskitError
sourceimpl Error for TskitError
impl Error for TskitError
sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<MetadataError> for TskitError
impl From<MetadataError> for TskitError
sourcefn from(source: MetadataError) -> Self
fn from(source: MetadataError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for TskitError
impl !Send for TskitError
impl !Sync for TskitError
impl Unpin for TskitError
impl !UnwindSafe for TskitError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more