fn unpack_from_slice(input: &[u8]) -> Result<Self, ProgramError> {
        let input = array_ref![input, 0, LENDING_MARKET_LEN];
        #[allow(clippy::ptr_offset_with_cast)]
        let (version, bump_seed, owner, quote_token_mint, token_program_id, _padding) =
            array_refs![input, 1, 1, 32, 32, 32, 62];
        let version = u8::from_le_bytes(*version);
        if version > PROGRAM_VERSION {
            return Err(ProgramError::InvalidAccountData);
        }

        Ok(Self {
            version,
            bump_seed: u8::from_le_bytes(*bump_seed),
            owner: Pubkey::new_from_array(*owner),
            quote_token_mint: Pubkey::new_from_array(*quote_token_mint),
            token_program_id: Pubkey::new_from_array(*token_program_id),
        })
    }
/// Unpacks a byte buffer into a [LendingMarketInfo](struct.LendingMarketInfo.html).
Unpacks a byte buffer into a [LendingMarketInfo](struct.LendingMarketInfo.html).
Unpacks a byte buffer into a [ LendingMarketInfo ] ( struct . LendingMarketInfo . html ) .
fn unpack_from_slice(input: &[u8]) -> Result<Self, ProgramError> {
        let input = array_ref![input, 0, LENDING_MARKET_LEN];
        #[allow(clippy::ptr_offset_with_cast)]
        let (version, bump_seed, owner, quote_token_mint, token_program_id, _padding) =
            array_refs![input, 1, 1, 32, 32, 32, 62];
        let version = u8::from_le_bytes(*version);
        if version > PROGRAM_VERSION {
            return Err(ProgramError::InvalidAccountData);
        }
        Ok(Self {
            version,
            bump_seed: u8::from_le_bytes(*bump_seed),
            owner: Pubkey::new_from_array(*owner),
            quote_token_mint: Pubkey::new_from_array(*quote_token_mint),
            token_program_id: Pubkey::new_from_array(*token_program_id),
        })
    }
fn unpack_from_slice ( input : & [ u8 ] ) -> Result < Self , ProgramError > { let input = array_ref ! [ input 0 LENDING_MARKET_LEN ] ; # [ allow ( clippy ptr_offset_with_cast ) ] let ( version , bump_seed , owner , quote_token_mint , token_program_id , _padding ) = array_refs ! [ input 1 1 32 32 32 62 ] ; let version = u8 :: from_le_bytes ( * version ) ; if version > PROGRAM_VERSION { return Err ( ProgramError :: InvalidAccountData ) ; } Ok ( Self { version , bump_seed : u8 :: from_le_bytes ( * bump_seed ) , owner : Pubkey :: new_from_array ( * owner ) , quote_token_mint : Pubkey :: new_from_array ( * quote_token_mint ) , token_program_id : Pubkey :: new_from_array ( * token_program_id ) , } ) }
Unpacks a byte buffer into a [LendingMarketInfo](struct.LendingMarketInfo.html).
Unpacks a byte buffer into a [ LendingMarketInfo ] ( struct . LendingMarketInfo . html ) .
input
&[u8]