Trait rocket::listener::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>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Bind for DefaultListener

§

type Error = Error

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

type Error = Error