pub struct Collector { /* private fields */ }
Expand description
Collector collects the results and errors of a macro expansion
Implementations§
Source§impl Collector
impl Collector
Sourcepub fn error(&mut self, e: Error)
pub fn error(&mut self, e: Error)
report an error
once an error has been reported to an collector, Expand
s will no longer be run
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
checks if any errors have been reported yet
Sourcepub fn finish(self) -> TokenStream
pub fn finish(self) -> TokenStream
finish the expansion and return the result
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Collector
impl RefUnwindSafe for Collector
impl !Send for Collector
impl !Sync for Collector
impl Unpin for Collector
impl UnwindSafe for Collector
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