fn is_initialized_account(input: &[u8]) -> Result<bool, ProgramError> {
    const ACCOUNT_INITIALIZED_INDEX: usize = 108; // See state.rs#L99

    if input.len() != BASE_ACCOUNT_LENGTH {
        return Err(ProgramError::InvalidAccountData);
    }
    Ok(input[ACCOUNT_INITIALIZED_INDEX] != 0)
}
/// Checks a base buffer to verify if it is an Account without having to completely deserialize it
Checks a base buffer to verify if it is an Account without having to completely deserialize it
Checks a base buffer to verify if it is an Account without having to completely deserialize it
fn is_initialized_account(input: &[u8]) -> Result<bool, ProgramError> {
    const ACCOUNT_INITIALIZED_INDEX: usize = 108; // See state.rs#L99
    if input.len() != BASE_ACCOUNT_LENGTH {
        return Err(ProgramError::InvalidAccountData);
    }
    Ok(input[ACCOUNT_INITIALIZED_INDEX] != 0)
}
fn is_initialized_account ( input : & [ u8 ] ) -> Result < bool , ProgramError > { const ACCOUNT_INITIALIZED_INDEX : usize = 108 ; // See state.rs#L99 if input . len ( ) != BASE_ACCOUNT_LENGTH { return Err ( ProgramError :: InvalidAccountData ) ; } Ok ( input [ ACCOUNT_INITIALIZED_INDEX ] != 0 ) }
Checks a base buffer to verify if it is an Account without having to completely deserialize it
Checks a base buffer to verify if it is an Account without having to completely deserialize it
input
&[u8]
input
&[u8]