Enum ErrorKind

Source
pub enum ErrorKind {
    Io(Error),
    Json(Error),
    Msg(String),
    UnknownFileType(u32),
    VersionMismatch(Version, Version),
    Eof,
    UnknownTag(u32),
    UnsupportedAttr(&'static str, u32),
    UnsupportedVersion(u32),
    MissingFunction(u32, Ident),
    RecordWithoutFunction,
    CountsMismatch(&'static str, Type, usize, usize),
    // some variants omitted
}
Expand description

The kind of an error.

Variants§

§

Io(Error)

Wrapper of standard I/O error.

§

Json(Error)

Wrapper of JSON error.

§

Msg(String)

A convenient variant for String.

§

UnknownFileType(u32)

Trying to read a file which is not GCNO/GCDA format.

§

VersionMismatch(Version, Version)

Version of a Gcov does not match that of the Graph when using merge().

§

Eof

Reached the end of a record when reading. Usually not fatal.

§

UnknownTag(u32)

Encountered an unknown record.

§

UnsupportedAttr(&'static str, u32)

Encountered an unknown block/arc flag.

§

UnsupportedVersion(u32)

The GCNO/GCDA is created for a GCC version that is not recognized by the cov crate.

§

MissingFunction(u32, Ident)

The GCDA provides statistics of a function which cannot be found from the Graph. This error typically arises when merging a GCDA before its corresponding GCNO, or running an outdated version of program after the code has been recompiled (which generates a new GCNO).

§

RecordWithoutFunction

Encountered a GCNO record without the corresponding function. This means the GCNO file is corrupt.

§

CountsMismatch(&'static str, Type, usize, usize)

The expected number of profilable arcs on the GCDA and GCNO differs.

Implementations§

Source§

impl ErrorKind

Source

pub fn description(&self) -> &str

A string describing the error kind.

Trait Implementations§

Source§

impl Debug for ErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ErrorKind

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a str> for ErrorKind

Source§

fn from(s: &'a str) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ErrorKind

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorKind> for Error

Source§

fn from(e: ErrorKind) -> Self

Converts to this type from the input type.
Source§

impl From<String> for ErrorKind

Source§

fn from(s: String) -> Self

Converts to this type from the input type.
Source§

impl IsEof for ErrorKind

Source§

fn is_eof(&self) -> bool

Checks whether the error is caused by an unexpected EOF.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.