Struct edres::FilesOptions
source · [−]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
sourceimpl 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
sourceimpl Clone for FilesOptions
impl Clone for FilesOptions
sourcefn clone(&self) -> FilesOptions
fn clone(&self) -> FilesOptions
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FilesOptions
impl Debug for FilesOptions
sourceimpl Default for FilesOptions
impl Default for FilesOptions
sourcefn default() -> FilesOptions
fn default() -> FilesOptions
Examples
assert_eq!(FilesOptions::default(), FilesOptions::new());
sourceimpl PartialEq<FilesOptions> for FilesOptions
impl PartialEq<FilesOptions> for FilesOptions
sourcefn eq(&self, other: &FilesOptions) -> bool
fn eq(&self, other: &FilesOptions) -> bool
impl Eq for FilesOptions
impl StructuralEq for FilesOptions
impl StructuralPartialEq for FilesOptions
Auto Trait Implementations
impl RefUnwindSafe for FilesOptions
impl Send for FilesOptions
impl Sync for FilesOptions
impl Unpin for FilesOptions
impl UnwindSafe for FilesOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.