pub trait Bind: Listener + 'static {
type Error: Error + Send + 'static;
// Required methods
async fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error>;
fn bind_endpoint(to: &Rocket<Ignite>) -> Result<Endpoint, Self::Error>;
}
Required Associated Types§
Required Methods§
Sourceasync fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error>
async fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error>
§Future Bounds
The Future
generated by this async fn
must be Send
.
fn bind_endpoint(to: &Rocket<Ignite>) -> Result<Endpoint, Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.