mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-01-20 18:21:37 +01:00
Add listen_with fns.
This commit is contained in:
@@ -77,6 +77,13 @@ pub struct ListenFuture {
|
||||
inner: futures::Oneshot<io::Result<SocketAddr>>,
|
||||
}
|
||||
|
||||
impl ListenFuture {
|
||||
#[doc(hidden)]
|
||||
pub fn from_oneshot(rx: futures::Oneshot<io::Result<SocketAddr>>) -> Self {
|
||||
ListenFuture { inner: rx }
|
||||
}
|
||||
}
|
||||
|
||||
impl Future for ListenFuture {
|
||||
type Item = SocketAddr;
|
||||
type Error = io::Error;
|
||||
|
||||
Reference in New Issue
Block a user