pub struct PassRun { /* private fields */ }Expand description
One entry in a Report: a pass that ran and what it did.
Entries appear in execution order. When a pipeline is run to a fixpoint, a pass that runs on three sweeps contributes three entries, one per sweep.
Implementations§
Source§impl PassRun
impl PassRun
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
The name of the pass that ran.
§Examples
use pass_lang::{Outcome, Pass, PassError, PassManager};
struct Touch;
impl Pass<i64> for Touch {
fn name(&self) -> &'static str { "touch" }
fn run(&mut self, u: &mut i64) -> Result<Outcome, PassError> {
*u += 1;
Ok(Outcome::Changed)
}
}
let mut pm = PassManager::new();
pm.add(Touch);
let mut unit = 0;
let report = pm.run(&mut unit).unwrap();
assert_eq!(report.runs()[0].name(), "touch");Trait Implementations§
impl Copy for PassRun
impl Eq for PassRun
impl StructuralPartialEq for PassRun
Auto Trait Implementations§
impl Freeze for PassRun
impl RefUnwindSafe for PassRun
impl Send for PassRun
impl Sync for PassRun
impl Unpin for PassRun
impl UnsafeUnpin for PassRun
impl UnwindSafe for PassRun
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