fn unpack_from_slice(input: &[u8]) -> Result<Self, ProgramError> {
        let input = array_ref![input, 0, POOL_MANAGER_LEN];
        #[allow(clippy::ptr_offset_with_cast)]
            let (
            version,
            bump_seed,
            pending_owner,
            owner,
            quote_currency,
            token_program_id,
            oracle_program_id,
            mine_mint,
            mine_supply_account,
            _padding,
        ) = array_refs![
            input,
            1,
            1,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            128
        ];

        let version = u8::from_le_bytes(*version);
        if version > PROGRAM_VERSION {
            msg!("pool manager version does not match pooling program version");
            return Err(ProgramError::InvalidAccountData);
        }

        Ok(Self {
            version,
            bump_seed: u8::from_le_bytes(*bump_seed),
            pending_owner: Pubkey::new_from_array(*pending_owner),
            owner: Pubkey::new_from_array(*owner),
            quote_currency: *quote_currency,
            token_program_id: Pubkey::new_from_array(*token_program_id),
            oracle_program_id: Pubkey::new_from_array(*oracle_program_id),
            mine_mint: Pubkey::new_from_array(*mine_mint),
            mine_supply_account: Pubkey::new_from_array(*mine_supply_account),
        })
    }
/// Unpacks a byte buffer into a [PoolManagerInfo](struct.PoolManagerInfo.html)

Unpacks a byte buffer into a [PoolManagerInfo](struct.PoolManagerInfo.html)
Unpacks a byte buffer into a [ PoolManagerInfo ] ( struct . PoolManagerInfo . html )
fn unpack_from_slice(input: &[u8]) -> Result<Self, ProgramError> {
        let input = array_ref![input, 0, POOL_MANAGER_LEN];
        #[allow(clippy::ptr_offset_with_cast)]
            let (
            version,
            bump_seed,
            pending_owner,
            owner,
            quote_currency,
            token_program_id,
            oracle_program_id,
            mine_mint,
            mine_supply_account,
            _padding,
        ) = array_refs![
            input,
            1,
            1,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            PUBKEY_BYTES,
            128
        ];
        let version = u8::from_le_bytes(*version);
        if version > PROGRAM_VERSION {
            msg!("pool manager version does not match pooling program version");
            return Err(ProgramError::InvalidAccountData);
        }
        Ok(Self {
            version,
            bump_seed: u8::from_le_bytes(*bump_seed),
            pending_owner: Pubkey::new_from_array(*pending_owner),
            owner: Pubkey::new_from_array(*owner),
            quote_currency: *quote_currency,
            token_program_id: Pubkey::new_from_array(*token_program_id),
            oracle_program_id: Pubkey::new_from_array(*oracle_program_id),
            mine_mint: Pubkey::new_from_array(*mine_mint),
            mine_supply_account: Pubkey::new_from_array(*mine_supply_account),
        })
    }
fn unpack_from_slice ( input : & [ u8 ] ) -> Result < Self , ProgramError > { let input = array_ref ! [ input 0 POOL_MANAGER_LEN ] ; # [ allow ( clippy ptr_offset_with_cast ) ] let ( version , bump_seed , pending_owner , owner , quote_currency , token_program_id , oracle_program_id , mine_mint , mine_supply_account , _padding , ) = array_refs ! [ input 1 1 PUBKEY_BYTES PUBKEY_BYTES PUBKEY_BYTES PUBKEY_BYTES PUBKEY_BYTES PUBKEY_BYTES PUBKEY_BYTES 128 ] ; let version = u8 :: from_le_bytes ( * version ) ; if version > PROGRAM_VERSION { msg ! ( " " ) ; return Err ( ProgramError :: InvalidAccountData ) ; } Ok ( Self { version , bump_seed : u8 :: from_le_bytes ( * bump_seed ) , pending_owner : Pubkey :: new_from_array ( * pending_owner ) , owner : Pubkey :: new_from_array ( * owner ) , quote_currency : * quote_currency , token_program_id : Pubkey :: new_from_array ( * token_program_id ) , oracle_program_id : Pubkey :: new_from_array ( * oracle_program_id ) , mine_mint : Pubkey :: new_from_array ( * mine_mint ) , mine_supply_account : Pubkey :: new_from_array ( * mine_supply_account ) , } ) }
Unpacks a byte buffer into a [PoolManagerInfo](struct.PoolManagerInfo.html)
Unpacks a byte buffer into a [ PoolManagerInfo ] ( struct . PoolManagerInfo . html )
input
&[u8]
input
&[u8]