pub struct Errors<'sess> {
pub(crate) sess: &'sess FluxSession,
pub(crate) err: Cell<Option<ErrorGuaranteed>>,
}
Expand description
Convenience struct implementing [ErrorEmitter
] and [ErrorCollector
]
Fields§
§sess: &'sess FluxSession
§err: Cell<Option<ErrorGuaranteed>>
Implementations§
Source§impl<'sess> Errors<'sess>
impl<'sess> Errors<'sess>
pub fn new(sess: &'sess FluxSession) -> Self
pub fn has_errors(&self) -> bool
pub fn emit<'a>(&'a self, err: impl Diagnostic<'a>) -> ErrorGuaranteed
pub fn into_result(self) -> Result<(), ErrorGuaranteed>
Trait Implementations§
Source§impl ErrorCollector<ErrorGuaranteed> for Errors<'_>
impl ErrorCollector<ErrorGuaranteed> for Errors<'_>
type Result = Result<(), ErrorGuaranteed>
fn collect(&mut self, err: ErrorGuaranteed)
fn into_result(self) -> Self::Result
Source§impl ErrorEmitter for Errors<'_>
impl ErrorEmitter for Errors<'_>
fn emit<'a>(&'a self, err: impl Diagnostic<'a>) -> ErrorGuaranteed
Auto Trait Implementations§
impl<'sess> !Freeze for Errors<'sess>
impl<'sess> !RefUnwindSafe for Errors<'sess>
impl<'sess> !Send for Errors<'sess>
impl<'sess> !Sync for Errors<'sess>
impl<'sess> Unpin for Errors<'sess>
impl<'sess> !UnwindSafe for Errors<'sess>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more