pub struct BufferEmitter(Rc<RefCell<ErrBuffer>>, Rc<RefCell<WarningBuffer>>);
Expand description
An Emitter
that collects into a list.
Tuple Fields§
§0: Rc<RefCell<ErrBuffer>>
§1: Rc<RefCell<WarningBuffer>>
Implementations§
Source§impl BufferEmitter
impl BufferEmitter
Sourcepub fn extract_errs(&self) -> ErrBuffer
pub fn extract_errs(&self) -> ErrBuffer
Extracts all the errors collected in this emitter.
Sourcepub fn extract_warnings(&self) -> WarningBuffer
pub fn extract_warnings(&self) -> WarningBuffer
Extracts all the errors collected in this emitter.
Trait Implementations§
Source§impl Clone for BufferEmitter
impl Clone for BufferEmitter
Source§fn clone(&self) -> BufferEmitter
fn clone(&self) -> BufferEmitter
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for BufferEmitter
impl Default for BufferEmitter
Source§fn default() -> BufferEmitter
fn default() -> BufferEmitter
Returns the “default value” for a type. Read more
Source§impl Emitter for BufferEmitter
impl Emitter for BufferEmitter
Source§fn last_emitted_err_code(&self) -> Option<i32>
fn last_emitted_err_code(&self) -> Option<i32>
Tracks last emitted error.
Source§fn emit_warning(&mut self, warning: LeoWarning)
fn emit_warning(&mut self, warning: LeoWarning)
Emit the warning.
Auto Trait Implementations§
impl Freeze for BufferEmitter
impl !RefUnwindSafe for BufferEmitter
impl !Send for BufferEmitter
impl !Sync for BufferEmitter
impl Unpin for BufferEmitter
impl !UnwindSafe for BufferEmitter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more