]> git.proxmox.com Git - proxmox-backup.git/commit - src/tools.rs
tools: add Tied value
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 12 Feb 2019 09:09:31 +0000 (10:09 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 12 Feb 2019 09:39:11 +0000 (10:39 +0100)
commit6ed25cbe3afcee6fb14bbc95849841dd37ffcf9e
tree45799da3c859714cefb69b41b1346be3237a0957
parent9ac1045c7b4a5b084ffcbcd162500a5dc2b8d5e0
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>
src/tools.rs
src/tools/borrow.rs [new file with mode: 0644]