pub fn is_satisfied(&self, witness: &Witness, from: &Pubkey) -> bool {
        match (self, witness) {
            (Condition::Signature(pubkey), Witness::Signature) => pubkey == from,
            (Condition::Timestamp(dt, pubkey), Witness::Timestamp(last_time)) => {
                pubkey == from && dt <= last_time
            }
            (
                Condition::AccountData(constraints),
                Witness::AccountData(actual_hash, program_id),
            ) => {
                constraints.program_id == *program_id
                    && constraints.key == *from
                    && constraints.data_hash == *actual_hash
            }
            _ => false,
        }
    }
/// Return true if the given Witness satisfies this Condition.
Return true if the given Witness satisfies this Condition.
Return true if the given Witness satisfies this Condition .
pub fn is_satisfied(&self, witness: &Witness, from: &Pubkey) -> bool {
        match (self, witness) {
            (Condition::Signature(pubkey), Witness::Signature) => pubkey == from,
            (Condition::Timestamp(dt, pubkey), Witness::Timestamp(last_time)) => {
                pubkey == from && dt <= last_time
            }
            (
                Condition::AccountData(constraints),
                Witness::AccountData(actual_hash, program_id),
            ) => {
                constraints.program_id == *program_id
                    && constraints.key == *from
                    && constraints.data_hash == *actual_hash
            }
            _ => false,
        }
    }
pub fn is_satisfied ( & self , witness : & Witness , from : & Pubkey ) -> bool { match ( self , witness ) { ( Condition :: Signature ( pubkey ) , Witness :: Signature ) => pubkey == from , ( Condition :: Timestamp ( dt , pubkey ) , Witness :: Timestamp ( last_time ) ) => { pubkey == from && dt <= last_time } ( Condition :: AccountData ( constraints ) , Witness :: AccountData ( actual_hash , program_id ) , ) => { constraints . program_id == * program_id && constraints . key == * from && constraints . data_hash == * actual_hash } _ => false , } }
Return true if the given Witness satisfies this Condition.
Return true if the given Witness satisfies this Condition .
&self
witness
&Witness
from
&Pubkey