If a customer is talking on the phone, listening to their MP3 player, chewing gum loudly, or are otherwise dismissive of the cashier, then, yes, they are being rude. It's up to the cashier, though, to be able to handle the situation without allowing it to affect customer service: More easily said than done.
I'm a veteran educator, but the circumstances of life have compelled me to also work in retail for the past couple of years. In fact, I just spent the evening ringing customers at the local B&N - even had an elderly gent ask, "why are you so happy?" (despite the fact that I had a fever before the Dayquil kicked in tonight). As a teacher, I've developed a pretty thick skin and I've learned not to take outward displays of disrespect personally and I know how to project a positive attitude, even when I'm not feeling particularly positive. But there are times when even I get ticked at a customer's behavior or attitude. Plus, not all cashiers have that defense mechanism, or know how to put a display of rude behavior aside and move on from the incident. That's just human nature. Plus, how much "customer service" training do people think cashiers actually get?
So while retail workers are paid to provide customer service, they are still people - who, more often than not, are still developing their thicker skins - and that does not absolve customers from the responsibility of their actions. Of course, customers can act any way they see fit, but it's better to treat the retail employees as individuals - not as nameless, faceless automatons. It doesn't take much effort, and really does help improve everyone's day.