pub struct EntryBuilder { /* private fields */ }Expand description
Builder for creating new watchfile entries.
Provides a fluent API for constructing entries with various components.
§Examples
use debian_watch::EntryBuilder;
// Minimal entry with just URL and pattern
let entry = EntryBuilder::new("https://github.com/example/tags")
.matching_pattern(".*/v?(\\d\\S+)\\.tar\\.gz")
.build();
// Entry with options
let entry = EntryBuilder::new("https://github.com/example/tags")
.matching_pattern(".*/v?(\\d\\S+)\\.tar\\.gz")
.opt("compression", "xz")
.flag("repack")
.version_policy("debian")
.script("uupdate")
.build();Implementations§
Source§impl EntryBuilder
impl EntryBuilder
Sourcepub fn matching_pattern(self, pattern: impl Into<String>) -> Self
pub fn matching_pattern(self, pattern: impl Into<String>) -> Self
Set the matching pattern for the entry.
Sourcepub fn version_policy(self, policy: impl Into<String>) -> Self
pub fn version_policy(self, policy: impl Into<String>) -> Self
Set the version policy for the entry.
Sourcepub fn opt(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn opt(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add an option to the entry.
Trait Implementations§
Source§impl Clone for EntryBuilder
impl Clone for EntryBuilder
Source§fn clone(&self) -> EntryBuilder
fn clone(&self) -> EntryBuilder
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 EntryBuilder
impl Debug for EntryBuilder
Source§impl Default for EntryBuilder
impl Default for EntryBuilder
Source§fn default() -> EntryBuilder
fn default() -> EntryBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EntryBuilder
impl RefUnwindSafe for EntryBuilder
impl Send for EntryBuilder
impl Sync for EntryBuilder
impl Unpin for EntryBuilder
impl UnwindSafe for EntryBuilder
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