tools: add Tied value

Tie two dependent values together, such as a nix::Dir with
its nix::dir::Iter<'a> where 'a is tied to the Dir's
lifetime, making it otherwise impossible to return them or
store them in a struct.

Alternatively we could try the 'rental' crate.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2019-02-12 10:09:31 +01:00
parent 9ac1045c7b
commit 6ed25cbe3a
2 changed files with 46 additions and 0 deletions

View File

@ -24,6 +24,7 @@ pub mod wrapped_reader_stream;
#[macro_use]
pub mod common_regex;
pub mod ticket;
pub mod borrow;
/// The `BufferedReader` trait provides a single function
/// `buffered_read`. It returns a reference to an internal buffer. The