rocket::listener

Trait Bind

Source
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§

Source

type Error: Error + Send + 'static

Required Methods§

Source

async fn bind(rocket: &Rocket<Ignite>) -> Result<Self, Self::Error>

§Future Bounds

The Future generated by this async fn must be Send.

Source

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.

Implementors§

Source§

impl Bind for DefaultListener

Source§

impl Bind for TcpListener

Source§

impl Bind for UnixListener

Available on Unix only.
Source§

impl<L> Bind for TlsListener<L>
where L: Listener<Accept = <L as Listener>::Connection> + Bind,

Available on crate feature tls only.