pub fn unpack(input: &[u8]) -> Result<Self, ProgramError> {
      let (tag, rest) = input.split_first().ok_or(InvalidInstruction)?;

      Ok(match tag {
          0 => Self::InitEscrow {
              amount: Self::unpack_amount(rest)?,
          },
          _ => return Err(InvalidInstruction.into()),
      })
  }
/// Unpacks a byte buffer into a [EscrowInstruction](enum.EscrowInstruction.html).
Unpacks a byte buffer into a [EscrowInstruction](enum.EscrowInstruction.html).
Unpacks a byte buffer into a [ EscrowInstruction ] ( enum . EscrowInstruction . html ) .
pub fn unpack(input: &[u8]) -> Result<Self, ProgramError> {
      let (tag, rest) = input.split_first().ok_or(InvalidInstruction)?;
      Ok(match tag {
          0 => Self::InitEscrow {
              amount: Self::unpack_amount(rest)?,
          },
          _ => return Err(InvalidInstruction.into()),
      })
  }
pub fn unpack ( input : & [ u8 ] ) -> Result < Self , ProgramError > { let ( tag , rest ) = input . split_first ( ) . ok_or ( InvalidInstruction ) ? ; Ok ( match tag { 0 => Self :: InitEscrow { amount : Self :: unpack_amount ( rest ) ? , } , _ => return Err ( InvalidInstruction . into ( ) ) , } ) }
Unpacks a byte buffer into a [EscrowInstruction](enum.EscrowInstruction.html).
Unpacks a byte buffer into a [ EscrowInstruction ] ( enum . EscrowInstruction . html ) .
input
&[u8]
input
&[u8]