fn apply(
        &self,
        context: &mut Context,
    ) -> TractResult<(bool, Vec<Box<dyn Rule<'rules> + 'rules>>)> {
        let value =
            self.items.iter().try_fold(T::default(), |acc, f| acc.unify(&f.get(context)?))?;
        let mut changed = false;
        for item in &self.items {
            changed |= item.set(context, value.clone())?;
        }
        return Ok((changed, vec![]));
    }
/// Tries to apply the rule to a given context.
Tries to apply the rule to a given context.
Tries to apply the rule to a given context .
fn apply(
        &self,
        context: &mut Context,
    ) -> TractResult<(bool, Vec<Box<dyn Rule<'rules> + 'rules>>)> {
        let value =
            self.items.iter().try_fold(T::default(), |acc, f| acc.unify(&f.get(context)?))?;
        let mut changed = false;
        for item in &self.items {
            changed |= item.set(context, value.clone())?;
        }
        return Ok((changed, vec![]));
    }
fn apply ( & self , context : & mut Context , ) -> TractResult < ( bool , Vec < Box < dyn Rule < ' rules > + ' rules > > ) > { let value = self . items . iter ( ) . try_fold ( T :: default ( ) , | acc , f | acc . unify ( & f . get ( context ) ? ) ) ? ; let mut changed = false ; for item in & self . items { changed |= item . set ( context , value . clone ( ) ) ? ; } return Ok ( ( changed , vec ! [ ] ) ) ; }
Tries to apply the rule to a given context.
Tries to apply the rule to a given context .
&self
context
&mut Context
&self
context
&mut Context