Crate tokio_file_unix [] [src]

A utility library that adds asynchronous support to file-like objects on Unix-like platforms.

This crate is primarily intended for pipes and other files that support nonblocking I/O. Regular files do not support nonblocking I/O, so this crate has no effect on them.

See File for an example of how a file can be made suitable for asynchronous I/O. See DelimCodec for a more comprehensive example of reading the lines of a file using futures::Stream.

Structs

DelimCodec

A Codec that splits the stream into frames divided by a given delimiter byte. All frames except possibly the last one contain the delimiter byte as the last element (this behavior differs from tokio_io::io::lines).

File

Used to wrap file-like objects so they can be used with tokio_core::reactor::PollEvented.

Newline

Represents a newline that can be used with DelimCodec.

StdFile

Wrapper for std::io::Std*Lock that can be used with File.