spl_token::state
pub fn unpack<T: IsInitialized>( input: &mut [u8]) -> Result<&mut T, ProgramError>
Unpacks a token state from a bytes buffer while assuring that the state is initialized.