pub struct Entry { /* private fields */ }Expand description
An entry in a format 5 watch file
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn matching_pattern(&self) -> Option<String>
pub fn matching_pattern(&self) -> Option<String>
Returns the matching pattern
Sourcepub fn get_option(&self, key: &str) -> Option<String>
pub fn get_option(&self, key: &str) -> Option<String>
Get the an option value from the entry, with fallback to defaults paragraph.
Sourcepub fn set_option(&mut self, option: WatchOption)
pub fn set_option(&mut self, option: WatchOption)
Set an option value in the entry using a WatchOption enum
Sourcepub fn set_option_str(&mut self, key: &str, value: &str)
pub fn set_option_str(&mut self, key: &str, value: &str)
Set an option value in the entry using string key and value (for backward compatibility)
Sourcepub fn delete_option(&mut self, option: WatchOption)
pub fn delete_option(&mut self, option: WatchOption)
Delete an option from the entry using a WatchOption enum
Sourcepub fn delete_option_str(&mut self, key: &str)
pub fn delete_option_str(&mut self, key: &str)
Delete an option from the entry using a string key (for backward compatibility)
Sourcepub fn version_policy(&self) -> Result<Option<VersionPolicy>, TypesParseError>
pub fn version_policy(&self) -> Result<Option<VersionPolicy>, TypesParseError>
Get the version policy
Sourcepub fn set_source(&mut self, url: &str)
pub fn set_source(&mut self, url: &str)
Set the source URL
Sourcepub fn set_matching_pattern(&mut self, pattern: &str)
pub fn set_matching_pattern(&mut self, pattern: &str)
Set the matching pattern
Sourcepub fn mode(&self) -> Result<Mode, TypesParseError>
pub fn mode(&self) -> Result<Mode, TypesParseError>
Retrieve the mode of the watch file entry with detailed error information.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entry
impl !RefUnwindSafe for Entry
impl !Send for Entry
impl !Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl !UnwindSafe for Entry
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