Struct srcerr::model::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]
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: Clone, Ed: Clone, Fs: Clone> Clone for SourceError<'files, Ec, Ed, Fs>
[src]fn clone(&self) -> SourceError<'files, Ec, Ed, Fs>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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, 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, 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, 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: PartialEq, Ed: PartialEq, Fs: PartialEq> PartialEq<SourceError<'files, Ec, Ed, Fs>> for SourceError<'files, Ec, Ed, Fs>
[src]fn eq(&self, other: &SourceError<'files, Ec, Ed, Fs>) -> bool
[src]
fn ne(&self, other: &SourceError<'files, Ec, Ed, Fs>) -> bool
[src]
impl<'files, Ec, Ed, Fs> StructuralEq 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]
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> 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> 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> 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> 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,
impl<'files, Ec, Ed, Fs> UnwindSafe for SourceError<'files, Ec, Ed, Fs> where
Ec: UnwindSafe,
Ed: UnwindSafe,
Fs: RefUnwindSafe,