pub enum Format {
SlashSlash,
Hash,
}Variants§
Implementations§
Source§impl Format
impl Format
pub fn from_path(path: &Path) -> Self
Sourcepub fn check_strip_license_line(self, line: &str) -> Option<&str>
pub fn check_strip_license_line(self, line: &str) -> Option<&str>
Strip the license line if it’s the right format. Return the SPDX id
Sourcepub fn check_strip_copyright_line(self, line: &str) -> Option<&str>
pub fn check_strip_copyright_line(self, line: &str) -> Option<&str>
Strip the copyright line if it’s the right format. Return “YYYY[-YYYY] HOLDER”
Sourcepub fn starts_with_sentinel(self, line: &str) -> bool
pub fn starts_with_sentinel(self, line: &str) -> bool
Check if the line starts with sentinel comment
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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