WatchFileV5

Struct WatchFileV5 

Source
pub struct WatchFileV5(/* private fields */);
Expand description

A watch file in format 5 (RFC822/deb822 style)

Implementations§

Source§

impl WatchFileV5

Source

pub fn new() -> Self

Create a new empty format 5 watch file

Source

pub fn version(&self) -> u32

Returns the version of the watch file (always 5 for this type)

Source

pub fn defaults(&self) -> Option<Paragraph>

Returns the defaults paragraph if it exists. The defaults paragraph is the second paragraph (after Version) if it has no Source field.

Source

pub fn entries(&self) -> impl Iterator<Item = EntryV5> + '_

Returns an iterator over all entries in the watch file. The first paragraph contains defaults, subsequent paragraphs are entries.

Source

pub fn inner(&self) -> &Deb822

Get the underlying Deb822 object

Trait Implementations§

Source§

impl Debug for WatchFileV5

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WatchFileV5

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for WatchFileV5

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for WatchFileV5

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl WatchFileFormat for WatchFileV5

Source§

type Entry = EntryV5

The type used to represent individual watch entries
Source§

fn version(&self) -> u32

Returns the version of the watch file (1-5)
Source§

fn entries(&self) -> Box<dyn Iterator<Item = Self::Entry> + '_>

Returns an iterator over all entries in the watch file
Source§

fn to_string(&self) -> String

Convert the watch file back to its string representation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.