Struct srcerr::SourceError[][src]

pub struct SourceError<'files, Ec, Ed, Fs> {
    pub code: Ec,
    pub detail: Ed,
    pub severity: Severity,
    pub marker: PhantomData<&'files Fs>,
}

Information about an error from source data.

Type Parameters

Fields

code: Ec

Code within the ErrorCode this error corresponds to.

detail: Ed

Suggestions or hints to provide to the user.

severity: Severity

Severity level for diagnostic messages.

marker: PhantomData<&'files Fs>

Marker.

Implementations

impl<'files, Ec, Ed, Fs> SourceError<'files, Ec, Ed, Fs> where
    Ec: ErrorCode,
    Ed: ErrorDetail<'files, Files = Fs>,
    Fs: Files<'files>, 
[src]

pub fn new(code: Ec, detail: Ed, severity: Severity) -> Self[src]

Returns a new SourceError.

pub fn as_diagnostic(&self, files: &Fs) -> Diagnostic<Fs::FileId>[src]

Returns a Diagnostic built from this error.

Trait Implementations

impl<'files, Ec: Clone, Ed: Clone, Fs: Clone> Clone for SourceError<'files, Ec, Ed, Fs>[src]

impl<'files, Ec: Debug, Ed: Debug, Fs: Debug> Debug for SourceError<'files, Ec, Ed, Fs>[src]

impl<'files, Ec, Ed, Fs> Display for SourceError<'files, Ec, Ed, Fs> where
    Ec: ErrorCode,
    Ed: ErrorDetail<'files, Files = Fs> + Display,
    Fs: Files<'files>, 
[src]

impl<'files, Ec: Eq, Ed: Eq, Fs: Eq> Eq for SourceError<'files, Ec, Ed, Fs>[src]

impl<'files, Ec, Ed, Fs> Error for SourceError<'files, Ec, Ed, Fs> where
    Ec: ErrorCode + Debug,
    Ed: ErrorDetail<'files, Files = Fs> + Error,
    Fs: Files<'files> + Debug
[src]

impl<'files, Ec: PartialEq, Ed: PartialEq, Fs: PartialEq> PartialEq<SourceError<'files, Ec, Ed, Fs>> for SourceError<'files, Ec, Ed, Fs>[src]

impl<'files, Ec, Ed, Fs> StructuralEq for SourceError<'files, Ec, Ed, Fs>[src]

impl<'files, Ec, Ed, Fs> StructuralPartialEq for SourceError<'files, Ec, Ed, Fs>[src]

Auto Trait Implementations

impl<'files, Ec, Ed, Fs> RefUnwindSafe for SourceError<'files, Ec, Ed, Fs> where
    Ec: RefUnwindSafe,
    Ed: RefUnwindSafe,
    Fs: RefUnwindSafe

impl<'files, Ec, Ed, Fs> Send for SourceError<'files, Ec, Ed, Fs> where
    Ec: Send,
    Ed: Send,
    Fs: Sync

impl<'files, Ec, Ed, Fs> Sync for SourceError<'files, Ec, Ed, Fs> where
    Ec: Sync,
    Ed: Sync,
    Fs: Sync

impl<'files, Ec, Ed, Fs> Unpin for SourceError<'files, Ec, Ed, Fs> where
    Ec: Unpin,
    Ed: Unpin

impl<'files, Ec, Ed, Fs> UnwindSafe for SourceError<'files, Ec, Ed, Fs> where
    Ec: UnwindSafe,
    Ed: UnwindSafe,
    Fs: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.