Rust really isn't the issue. It's the slight surface corrosion that naturally occurs on the surface of any steel, even stainless.
On carbon steel, an edge should keep indefinately in a dry place. Living in the East, all my handguns are stainless; however, if I lived in a broiling desert, I wouldn't need it. Steel just doesn't tend to rust in a dry environ. On stainless steel, the chromium content of a gun or knife will create a protective layer on it (as LedSled noted), and that gives it its resistance to corrosion. If you wear a stainless part, the protective layer will form almost immediately. And this happens even more quickly if the steel is polished or sharpened. Chromium is tough, but it's not sharp, thus the carbon and other elements in most modern knives. On a satin finished stainless knife or gun, corrosion is more likely to form than on polished surfaces. Salts and moisture get trapped in those microscopic nooks and crannies, and speaking of salt, fingering a blade will leave minute deposits of oil and salt that will degrade the sharpness of a knife. If you wash your hands with soap and dry thoroughly, you can handle steels with less chance of corrosion. And some people have different amounts and kinds of oil and salts. I've known people who can't handle a blued gun without running the chance of leaving rust prints.
Oil does the same thing chromium does with stainless steels. Keeping an edge on a stainless knife depends on how stainless it is. Tough stainless steels like 410 and 420 will dull just by staring at them. Carbon and premium steel knives depends of where they're kept, how long they're kept there, how dry or moist the environ and how much oil and salt might be left on the blade. (Fingering a blade will dull a wicked sharp knife, but we all know that. Yet we can't help testing the sharpness again and again.) So everything above affects blade sharpness. Even sheaths dull knives.
That said, you can put a Cold Steel Voyager with a serrated blade in a drawer and it will always be wicked sharp, which is one reason I like that particular pattern of serration. Premium steels are more likely to keep an edge, but they aren't immune. On carbon steel, sharpen the damn blade and keep your fingers off it. Then put it in a dry safe. AUS8, VG-1, 440A/C and the like will pretty much lose their wicked sharp edges no matter what you do. At least that's been my experience.
Left alone unprotected, carbon steel tends
to begin corroding very quickly and eventually
slows, the rust itself forming a protective barrier.
Bluing is simply a controlled rust that is
attractively finished.