Rims have a lifespan which depends on how fast they thin through application of the brakes, and on how much you beat them up hitting potholes. The former can cause the rims to fail, while the latter will eventually make them impossible to true. Hubs have a different lifespan, usually much longer than that of rims if they are properly maintained. If you use standard hubs, like Chorus, Ultegra, or Dura Ace, you can replace the rims on them multiple times before the hub itself needs replacement.