#file-descriptor #cloneable #clone #io #compared #fs

cloneable-file

Cloneable file descriptor

2 releases

0.1.1 Feb 22, 2023
0.1.0 Feb 22, 2023

#4 in #cloneable


Used in 2 crates

Apache-2.0

11KB
246 lines

Cloneable file descriptor.

This allows a file descriptor to be cloned, ordered, compared, hashed etc.

Usage

#[derive(Clone)]
struct Event {
  file: CloneableFile,
}

fn process(vec: Vec<Event>) {}

let mut vec = Vec::new();
let file = CloneableFile::create("foo.txt")?;
vec.push(Event { file: file });
process(vec.clone());

Dependencies

~0–5MB