1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! extensions-rs
//!
//! [](https://github.com/travisbaars/extensions-rs/actions)
//! [](https://crates.io/crates/extensions-rs)
//! [](https://docs.rs/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
//!
//! Add `extensions-rs` to your project's `Cargo.toml` file:
//!
//! ```toml
//! [dependencies]
//! extensions-rs = "0.2.1"
//! ```
//!
//! Or use `cargo add`:
//!
//! ```bash
//! cargo add extensions-rs
//! ```
//!
//! ## Examples
//!
//! #### Conversion from `Extension` to `str`:
//!
//! ```rust
//! use extensions_rs::Extension;
//! use extensions_rs::ext::Image;
//!
//! assert_eq!("png", Extension::to_str(Extension::Image(Image::ExtPNG)));
//! ```
//!
//! #### Simple conversion, `&str` to `Image` type:
//!
//! ```rust
//! use extensions_rs::ext::Image;
//!
//! assert_eq!(Image::ExtJPG, Image::from("jpg"));
//! ```
//!
//! #### Validate extension:
//!
//! ```
//! use extensions_rs::utils::Validate;
//!
//! # tokio_test::block_on(async {
//! assert_eq!(true, Validate::check_str("jpg").await);
//! # })
//! ```
pub
pub
pub use crate;