pub struct FilesOptions {
    pub file_paths_const_name: Option<Cow<'static, str>>,
    pub get_path_fn_name: Option<Cow<'static, str>>,
    pub file_strings_const_name: Option<Cow<'static, str>>,
    pub get_string_fn_name: Option<Cow<'static, str>>,
    pub file_bytes_const_name: Option<Cow<'static, str>>,
    pub get_bytes_fn_name: Option<Cow<'static, str>>,
}
Expand description

Options specific to how edres should handle input files.

Fields

file_paths_const_name: Option<Cow<'static, str>>

If present, generates a const with this name containing a slice of the paths of the files used to generate the output.

get_path_fn_name: Option<Cow<'static, str>>

If present, generates a method which returns the path associated with an enum variant.

file_strings_const_name: Option<Cow<'static, str>>

If present, generates a const with this name containing a slice of the string contents of each file used to generate the output.

get_string_fn_name: Option<Cow<'static, str>>

If present, generates a method which returns the string contents associated with an enum variant.

file_bytes_const_name: Option<Cow<'static, str>>

If present, generates a const with this name containing a slice of the binary contents of each file used to generate the output.

get_bytes_fn_name: Option<Cow<'static, str>>

If present, generates a method which returns the bytes associated with an enum variant.

Implementations

Examples
assert_eq!(FilesOptions::new(), FilesOptions {
    file_paths_const_name: Some("FILE_PATHS".into()),
    get_path_fn_name: Some("path".into()),
    file_strings_const_name: None,
    get_string_fn_name: None,
    file_bytes_const_name: None,
    get_bytes_fn_name: None,
});
Examples
assert_eq!(FilesOptions::minimal(), FilesOptions {
    file_paths_const_name: None,
    get_path_fn_name: None,
    file_strings_const_name: None,
    get_string_fn_name: None,
    file_bytes_const_name: None,
    get_bytes_fn_name: None,
});
Examples
assert_eq!(FilesOptions::file_bytes(), FilesOptions {
    file_paths_const_name: None,
    get_path_fn_name: None,
    file_strings_const_name: None,
    get_string_fn_name: None,
    file_bytes_const_name: Some("FILE_BYTES".into()),
    get_bytes_fn_name: Some("bytes".into()),
});
Examples
assert_eq!(FilesOptions::file_strings(), FilesOptions {
    file_paths_const_name: None,
    get_path_fn_name: None,
    file_strings_const_name: Some("FILE_STRINGS".into()),
    get_string_fn_name: Some("string".into()),
    file_bytes_const_name: None,
    get_bytes_fn_name: None,
});

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Examples
assert_eq!(FilesOptions::default(), FilesOptions::new());
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.