file_type

Macro file_type 

Source
file_type!() { /* proc-macro */ }
Expand description

Procedural macro for creating a simple file type.

Creates a type representing a single file with standard file operations. Automatically includes serde derives when the serde feature is enabled.

§Example

file_type!(ConfigFile);

let config = ConfigFile::new("/etc/app/config.toml");
let contents = config.read_to_string()?;