OK, I'm a pseudo HR guy, so I know a bit about this, but terminations is not my day-in-day out job. I'll give my best stab at this, but I know a number of states have special laws regarding employment that could possible be a factor depending on where you live.
Basically put, you are not obligated to work at a job, you could walk out last minute, and there would be no real difference. The 2 weeks thing is just a standard courtesy that employers are socially expected to honor. There are exceptions where you can't leave right away, especially with jobs that safety are a issue if you would quit. There are also contractual obligations, but i doubt that comes into play with many part time jobs. No matter what, you should be paid to the last minute that you work, and be awarded any other benefits that may have been promised to you in cases where you quit (like vacation time off compensation).
With the 2 week thing being courtesy, they technically can say you are fired last minute, and some rotten employers companies do that. They can run into trouble in cases of employment lawsuits and unemployment claims. The minute a judge gets wind that the company may be fraudulent in its documentation, everything defaults to the claimant. Companies who don't honor resignations just end up getting bit in the ass. No matter what, you may want to keep paper documentation of your resignation and any issues that could occur if your boss is a jerk. If something happens, see if you can get a statement from a co-worker, or anything that could help you out.
Overall though, this might not be an issue if it is a larger company. And if your boss makes a deal about it, you can get it resolved through HR, but you do want to get it resolved in case a future employer does a past employment check. Also, Make sure to follow-up on your end with your boss, HR cares about what you did on your part to resign. If you see your boss every day, you should stop in, because I am betting that they want just to talk about it. Personally, I would never resign via email to my boss, because she doesn't read her email. Other bosses pretty much only communicate via email, but I don't know your case. No matter what, HR should be able to correct your record to a voluntary termination, but the "rehire status" is kinda a key thing for terminations in the HR world, and that is why the follow up with your boss is important.