pub struct ReduceContext { /* private fields */ }Expand description
Host state for the reduce phase of one rule.
Built per rule rather than per run, because a rule sees only its own facts — letting one rule read another’s would turn a private payload shape into a contract between rules.
Implementations§
Source§impl ReduceContext
impl ReduceContext
Sourcepub fn new(files: Vec<String>, facts: Vec<ReduceFact>) -> Self
pub fn new(files: Vec<String>, facts: Vec<ReduceFact>) -> Self
Build a context over one rule’s facts and the discovered file list.
Sourcepub fn take_reports(&self) -> Vec<ReduceReport>
pub fn take_reports(&self) -> Vec<ReduceReport>
Take everything reported so far, leaving the context empty.
Trait Implementations§
Source§impl Clone for ReduceContext
impl Clone for ReduceContext
Source§fn clone(&self) -> ReduceContext
fn clone(&self) -> ReduceContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ReduceContext
impl !Send for ReduceContext
impl !Sync for ReduceContext
impl !UnwindSafe for ReduceContext
impl Freeze for ReduceContext
impl Unpin for ReduceContext
impl UnsafeUnpin for ReduceContext
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