pub(crate) struct RenderingSink<'a> {
pub(crate) src: &'a str,
pub(crate) errors: usize,
pub(crate) warnings: usize,
}Expand description
A [DiagnosticSink] that renders each diagnostic to stderr as it
arrives and tracks error/warning counts. The CLI drives one of these
across every phase and checks Self::had_error at each phase
barrier; that, not Severity::Error itself, is what stops the build.
Fields§
§src: &'a str§errors: usize§warnings: usizeImplementations§
Source§impl<'a> RenderingSink<'a>
impl<'a> RenderingSink<'a>
pub(crate) fn new(src: &'a str) -> Self
pub(crate) fn had_error(&self) -> bool
Sourcepub(crate) fn render_all(&mut self, diags: impl IntoIterator<Item = Diagnostic>)
pub(crate) fn render_all(&mut self, diags: impl IntoIterator<Item = Diagnostic>)
Render every diagnostic in diags. Bridges phases that still
return a Vec<Diagnostic> (layout, PDF emit) into the sink.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RenderingSink<'a>
impl<'a> RefUnwindSafe for RenderingSink<'a>
impl<'a> Send for RenderingSink<'a>
impl<'a> Sync for RenderingSink<'a>
impl<'a> Unpin for RenderingSink<'a>
impl<'a> UnsafeUnpin for RenderingSink<'a>
impl<'a> UnwindSafe for RenderingSink<'a>
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
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.