pub fn from_instruction(
        ins: Result<script::Instruction<'txin>, elements::script::Error>,
    ) -> Result<Self, Error> {
        match ins {
            //Also covers the dissatisfied case as PushBytes0
            Ok(script::Instruction::PushBytes(v)) => Ok(Element::from(v)),
            Ok(script::Instruction::Op(opcodes::all::OP_PUSHNUM_1)) => Ok(Element::Satisfied),
            _ => Err(Error::ExpectedPush),
        }
    }
/// Converts a Bitcoin `script::Instruction` to a stack element
///
/// Supports `OP_1` but no other numbers since these are not used by Miniscript
Converts a Bitcoin `script::Instruction` to a stack element
Supports `OP_1` but no other numbers since these are not used by Miniscript
Converts a Bitcoin ` script :: Instruction ` to a stack element Supports ` OP_1 ` but no other numbers since these are not used by Miniscript
pub fn from_instruction(
        ins: Result<script::Instruction<'txin>, elements::script::Error>,
    ) -> Result<Self, Error> {
        match ins {
            //Also covers the dissatisfied case as PushBytes0
            Ok(script::Instruction::PushBytes(v)) => Ok(Element::from(v)),
            Ok(script::Instruction::Op(opcodes::all::OP_PUSHNUM_1)) => Ok(Element::Satisfied),
            _ => Err(Error::ExpectedPush),
        }
    }
pub fn from_instruction ( ins : Result < script :: Instruction < ' txin > , elements :: script :: Error > , ) -> Result < Self , Error > { match ins { //Also covers the dissatisfied case as PushBytes0 Ok ( script :: Instruction :: PushBytes ( v ) ) => Ok ( Element :: from ( v ) ) , Ok ( script :: Instruction :: Op ( opcodes :: all :: OP_PUSHNUM_1 ) ) => Ok ( Element :: Satisfied ) , _ => Err ( Error :: ExpectedPush ) , } }
Converts a Bitcoin `script::Instruction` to a stack element
Supports `OP_1` but no other numbers since these are not used by Miniscript
Converts a Bitcoin ` script :: Instruction ` to a stack element Supports ` OP_1 ` but no other numbers since these are not used by Miniscript
ins
Result<script::Instruction<'txin>, elements::script::Error>
ins
Result<script::Instruction<'txin>, elements::script::Error>