pub struct FilesParagraph(/* private fields */);Expand description
A files paragraph
Implementations§
Source§impl FilesParagraph
impl FilesParagraph
Sourcepub fn add_file(&mut self, pattern: &str)
pub fn add_file(&mut self, pattern: &str)
Add a file pattern to the paragraph
If the pattern already exists, it will not be added again.
Sourcepub fn remove_file(&mut self, pattern: &str) -> bool
pub fn remove_file(&mut self, pattern: &str) -> bool
Remove a file pattern from the paragraph
Returns true if the pattern was found and removed, false otherwise.
Sourcepub fn matches(&self, filename: &Path) -> bool
pub fn matches(&self, filename: &Path) -> bool
Check whether the paragraph matches the given filename
Sourcepub fn set_copyright(&mut self, authors: &[&str])
pub fn set_copyright(&mut self, authors: &[&str])
Set the copyright
Sourcepub fn set_comment(&mut self, comment: &str)
pub fn set_comment(&mut self, comment: &str)
Set the comment associated with the files paragraph
Sourcepub fn set_license(&mut self, license: &License)
pub fn set_license(&mut self, license: &License)
Set the license associated with the files paragraph
Auto Trait Implementations§
impl Freeze for FilesParagraph
impl !RefUnwindSafe for FilesParagraph
impl !Send for FilesParagraph
impl !Sync for FilesParagraph
impl Unpin for FilesParagraph
impl UnsafeUnpin for FilesParagraph
impl !UnwindSafe for FilesParagraph
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