pub struct TextFilesConfig {
pub extensions: HashSet<String>,
pub special_names: HashSet<String>,
}Expand description
Text file detection configuration.
Fields§
§extensions: HashSet<String>File extensions that should be treated as text.
special_names: HashSet<String>Special file names that should be treated as text (without extension).
Implementations§
Source§impl TextFilesConfig
impl TextFilesConfig
Sourcepub fn is_text_file(&self, path: &Path) -> bool
pub fn is_text_file(&self, path: &Path) -> bool
Check if a path should be treated as a text file.
Trait Implementations§
Source§impl Clone for TextFilesConfig
impl Clone for TextFilesConfig
Source§fn clone(&self) -> TextFilesConfig
fn clone(&self) -> TextFilesConfig
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 TextFilesConfig
impl Debug for TextFilesConfig
Source§impl Default for TextFilesConfig
impl Default for TextFilesConfig
Source§impl<'de> Deserialize<'de> for TextFilesConfigwhere
TextFilesConfig: Default,
impl<'de> Deserialize<'de> for TextFilesConfigwhere
TextFilesConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TextFilesConfig
impl RefUnwindSafe for TextFilesConfig
impl Send for TextFilesConfig
impl Sync for TextFilesConfig
impl Unpin for TextFilesConfig
impl UnwindSafe for TextFilesConfig
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