How does this compare to Rocket (https://rocket.rs/) - I've just started using Rocket and it seems to provide everything that Hyper does and a lot more out of the box too
Others have explained the difference, but I wouldn't use Rocket at all, to be honest. It's barely maintained, the maintainer left for some time without telling anyone and without giving any repository access to other contributors, and it has a bus factor of one. I'd recommend Axum since it's backed by the Tokio contributors which makes it much less likely to be unmaintained later on.
The 0.5 release is literally years in the making and there's no indication that it'll be done any time soon. The creator said they finished most of it in a 2020 comment and it's still not done.
Hyper is a relatively low level HTTP library, while Rocket is a web server framework. So Hyper doesn't concern itself with things like routing, authentication, state management, template rendering, static file hosting and so on, which Rocket provides. Hyper is only focused on being a good implementation of the HTTP protocol and serving as a base for higher level libraries and applications. You could use Hyper to build a framework like Rocket - though AFAIK Rocket uses its own HTTP implementation.
It's kind of like that difference between Photoshop and libpng.
When would I use Hyper instead of Rocket?