pub fn evaluate_ver<'intp>(
        &mut self,
        n: &'intp u32,
    ) -> Option<Result<SatisfiedConstraint<'intp, 'txin>, Error>> {
        // Version is at index 11
        let ver = self[11];
        if let Err(e) = ver.try_push() {
            return Some(Err(e));
        }
        let elem = ver.as_push();
        if elem.len() == 4 {
            let wit_ver = util::slice_to_u32_le(elem);
            if wit_ver == *n {
                self.push(Element::Satisfied);
                Some(Ok(SatisfiedConstraint::VerEq { n: n }))
            } else {
                None
            }
        } else {
            Some(Err(Error::CovWitnessSizeErr {
                pos: 1,
                expected: 4,
                actual: elem.len(),
            }))
        }
    }
/// Evaluate a ver fragment. Get the version from the global stack
/// context and check equality
Evaluate a ver fragment. Get the version from the global stack
context and check equality
Evaluate a ver fragment . Get the version from the global stack context and check equality
pub fn evaluate_ver<'intp>(
        &mut self,
        n: &'intp u32,
    ) -> Option<Result<SatisfiedConstraint<'intp, 'txin>, Error>> {
        // Version is at index 11
        let ver = self[11];
        if let Err(e) = ver.try_push() {
            return Some(Err(e));
        }
        let elem = ver.as_push();
        if elem.len() == 4 {
            let wit_ver = util::slice_to_u32_le(elem);
            if wit_ver == *n {
                self.push(Element::Satisfied);
                Some(Ok(SatisfiedConstraint::VerEq { n: n }))
            } else {
                None
            }
        } else {
            Some(Err(Error::CovWitnessSizeErr {
                pos: 1,
                expected: 4,
                actual: elem.len(),
            }))
        }
    }
pub fn evaluate_ver < ' intp > ( & mut self , n : & ' intp u32 , ) -> Option < Result < SatisfiedConstraint < ' intp , ' txin > , Error > > { // Version is at index 11 let ver = self [ 11 ] ; if let Err ( e ) = ver . try_push ( ) { return Some ( Err ( e ) ) ; } let elem = ver . as_push ( ) ; if elem . len ( ) == 4 { let wit_ver = util :: slice_to_u32_le ( elem ) ; if wit_ver == * n { self . push ( Element :: Satisfied ) ; Some ( Ok ( SatisfiedConstraint :: VerEq { n : n } ) ) } else { None } } else { Some ( Err ( Error :: CovWitnessSizeErr { pos : 1 , expected : 4 , actual : elem . len ( ) , } ) ) } }
Evaluate a ver fragment.
Evaluate a ver fragment .
&mut self
n
&'intp u32
&mut self
n
&'intp u32