Skip to main content

Checks

Struct Checks 

Source
pub struct Checks<'a> {
    pub prefix: &'a str,
    pub usable: &'a dyn Fn(&ResourceName) -> bool,
    pub vouch: &'a dyn Fn(&Request, &ResourceName, &str) -> bool,
    pub on_disk: Option<OnDisk<'a>>,
    pub cache: &'a str,
    pub warn: &'a dyn Fn(String),
}
Expand description

What the caller knows of the destination directory.

Fields§

§prefix: &'a str

Perl’s resource_prefix (x unless set).

§usable: &'a dyn Fn(&ResourceName) -> bool

Whether a name may be written: a copy’s kept path outside this run’s site directory may not.

§vouch: &'a dyn Fn(&Request, &ResourceName, &str) -> bool

Whether name, owned by the source at source (relative to the destination directory), is the name that source takes and the source holds the request’s bytes: another source’s kept path or stem a request may share. Only a relative path to a regular file is read.

§on_disk: Option<OnDisk<'a>>

Whether a file of the name exists in the destination directory that the request may not write, asked of a name the store does not know: the store may not know every file earlier runs wrote (a deleted cache, an unusable one). None for a store in memory from the start (--nocache), whose names restart and overwrite as Perl’s do.

§cache: &'a str

The cache file a Warning names.

§warn: &'a dyn Fn(String)

Report a Warning (unexpected, cache): the caller emits it once the transaction is done, as a transaction run again in memory meets the same entries.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Checks<'a>

§

impl<'a> !Send for Checks<'a>

§

impl<'a> !Sync for Checks<'a>

§

impl<'a> !UnwindSafe for Checks<'a>

§

impl<'a> Freeze for Checks<'a>

§

impl<'a> Unpin for Checks<'a>

§

impl<'a> UnsafeUnpin for Checks<'a>

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.