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§
Source§impl FilesOptions
impl FilesOptions
Sourcepub const fn new() -> FilesOptions
pub const fn new() -> FilesOptions
§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,
});Sourcepub const fn minimal() -> FilesOptions
pub const fn minimal() -> FilesOptions
§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,
});Sourcepub const fn file_bytes() -> FilesOptions
pub const fn file_bytes() -> FilesOptions
§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()),
});Sourcepub const fn file_strings() -> FilesOptions
pub const fn file_strings() -> FilesOptions
§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§
Source§impl Clone for FilesOptions
impl Clone for FilesOptions
Source§fn clone(&self) -> FilesOptions
fn clone(&self) -> FilesOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilesOptions
impl Debug for FilesOptions
Source§impl Default for FilesOptions
impl Default for FilesOptions
Source§fn default() -> FilesOptions
fn default() -> FilesOptions
§Examples
assert_eq!(FilesOptions::default(), FilesOptions::new());Source§impl PartialEq for FilesOptions
impl PartialEq for FilesOptions
impl Eq for FilesOptions
impl StructuralPartialEq for FilesOptions
Auto Trait Implementations§
impl Freeze for FilesOptions
impl RefUnwindSafe for FilesOptions
impl Send for FilesOptions
impl Sync for FilesOptions
impl Unpin for FilesOptions
impl UnwindSafe for FilesOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.