This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use failure::Error; | |
| use futures::{Future, Stream}; | |
| use tokio::{io::AsyncRead, net::UnixListener}; | |
| fn main() -> Result<(), Error> { | |
| let listener = UnixListener::bind("socket.sock")?; | |
| tokio::run( | |
| listener | |
| .incoming() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trait HasAStringInIt { | |
| fn get_str(&self) -> &str; | |
| fn set_str(&mut self, new_string: String); | |
| } | |
| struct File { | |
| name: String, | |
| contents: Vec<u8>, | |
| } |