[−][src]Trait vujio_server::Listener
The Listener trait represents an implementation of http transport for a tide
application. In order to provide a Listener to tide, you will also need to
implement at least one ToListener
that
outputs your Listener type.
Required methods
#[must_use]pub fn bind<'life0, 'async_trait>(
&'life0 mut self,
app: Server<State>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
app: Server<State>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
Self: 'async_trait,
Bind the listener. This starts the listening process by opening the
necessary network ports, but not yet accepting incoming connections. This
method must be called before accept
.
#[must_use]pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
Self: 'async_trait,
Start accepting incoming connections. This method must be called only
after bind
has succeeded.
pub fn info(&self) -> Vec<ListenInfo, Global>
[src]
Expose information about the connection. This should always return valid
data after bind
has succeeded.
Implementations on Foreign Types
impl<State> Listener<State> for FailoverListener<State> where
State: Clone + Send + Sync + 'static,
[src]
State: Clone + Send + Sync + 'static,
pub fn bind<'life0, 'async_trait>(
&'life0 mut self,
app: Server<State>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
FailoverListener<State>: 'async_trait,
[src]
&'life0 mut self,
app: Server<State>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
FailoverListener<State>: 'async_trait,
pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
FailoverListener<State>: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
FailoverListener<State>: 'async_trait,
pub fn info(&self) -> Vec<ListenInfo, Global>
[src]
impl<State> Listener<State> for ConcurrentListener<State> where
State: Clone + Send + Sync + 'static,
[src]
State: Clone + Send + Sync + 'static,
pub fn bind<'life0, 'async_trait>(
&'life0 mut self,
app: Server<State>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
ConcurrentListener<State>: 'async_trait,
[src]
&'life0 mut self,
app: Server<State>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
ConcurrentListener<State>: 'async_trait,
pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
ConcurrentListener<State>: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
ConcurrentListener<State>: 'async_trait,
pub fn info(&self) -> Vec<ListenInfo, Global>
[src]
impl<L, State> Listener<State> for Box<L, Global> where
State: Send + Sync + 'static,
L: Listener<State>,
[src]
State: Send + Sync + 'static,
L: Listener<State>,
pub fn bind<'life0, 'async_trait>(
&'life0 mut self,
app: Server<State>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
Box<L, Global>: 'async_trait,
[src]
&'life0 mut self,
app: Server<State>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
Box<L, Global>: 'async_trait,
pub fn accept<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
Box<L, Global>: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send, Global>>ⓘ where
'life0: 'async_trait,
Box<L, Global>: 'async_trait,