mirror of https://github.com/chipsenkbeil/distant
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
492 B
Rust
36 lines
492 B
Rust
use std::io;
|
|
|
|
use async_trait::async_trait;
|
|
|
|
mod mapped;
|
|
pub use mapped::*;
|
|
|
|
mod mpsc;
|
|
pub use mpsc::*;
|
|
|
|
mod oneshot;
|
|
pub use oneshot::*;
|
|
|
|
mod tcp;
|
|
pub use tcp::*;
|
|
|
|
#[cfg(unix)]
|
|
mod unix;
|
|
|
|
#[cfg(unix)]
|
|
pub use unix::*;
|
|
|
|
#[cfg(windows)]
|
|
mod windows;
|
|
|
|
#[cfg(windows)]
|
|
pub use windows::*;
|
|
|
|
/// Represents a type that has a listen interface for receiving raw streams
|
|
#[async_trait]
|
|
pub trait Listener: Send + Sync {
|
|
type Output;
|
|
|
|
async fn accept(&mut self) -> io::Result<Self::Output>;
|
|
}
|