The typical “tetanus shot” (which you are recommended to get if you cut yourself on something rusty) also immunizes against pertussis (whooping cough) and diphtheria. Now there’s an odd threesome.
Rust has nothing to do with tetanus. You can get it from any open wound. Splinter, needle, animal or insect bite. Even burns, frostbite, or childbirth.