extensions-rs
A collection of file extension types in Rust.
The idea behind this crate is to give a simple way of handling file extension types.
Installation
Simply add extensions-rs to the dependencies your Cargo.toml file:
[]
= "0.2.1"
Or use the cargo add command:
Examples
Conversion to Extension type:
use Extension;
use Image;
assert_eq!;
Simple conversion, &str to Image type:
use Image;
assert_eq!
Validate extension:
use Validate;
assert_eq!
Todo
- Improve extension coverage
- Add text extensions
- Add video extensions
- Add archive extensions
- Add programming extensions
- Add document extensions
- Improve documentation
- Implement
to_strforImage - Add feature to take a whole
pathorstringand convert it to correct type - Remove unnecessary `async' funcion/methods. Possibly transition to alternate async options.