[−][src]Struct tough::Settings
Repository fetch settings, provided to Repository::load
.
Fields
root: R
A Read
er to the trusted root metadata file, which you must ship with your software
using an out-of-band-process.
This should be a copy of the most recent root.json from your repository. (It's okay if it becomes out of date later; the client establishes trust up to the most recent root.json file.)
datastore: &'a Path
A Path
to a directory on a persistent filesystem. Tough stores the most recently
fetched timestamp, snapshot, and targets metadata files here to detect version rollback
attacks. The directory must exist prior to calling Repository::load
.
metadata_base_url: &'a str
The URL base for TUF metadata (such as timestamp.json).
targets_base_url: &'a str
The URL base for targets.
limits: Limits
Limits used when fetching repository metadata.
This parameter implements Default
; see its documentation for details.
expiration_enforcement: ExpirationEnforcement
Metadata expiration enforcement.
When this parameter is set to Unsafe
, a Repository
will succeed in loading even if it
has expired metadata files.
CAUTION: TUF metadata expiration dates, particularly timestamp.json
, are designed to
limit a replay attack window. By setting expiration_enforcement
to Unsafe
, you are
disabling this feature of TUF. Use Safe
unless you have a good reason to use Unsafe
.
Trait Implementations
impl<'a, R: Clone + Read> Clone for Settings<'a, R>
[src]
impl<'a, R: Debug + Read> Debug for Settings<'a, R>
[src]
Auto Trait Implementations
impl<'a, R> RefUnwindSafe for Settings<'a, R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<'a, R> Send for Settings<'a, R> where
R: Send,
R: Send,
impl<'a, R> Sync for Settings<'a, R> where
R: Sync,
R: Sync,
impl<'a, R> Unpin for Settings<'a, R> where
R: Unpin,
R: Unpin,
impl<'a, R> UnwindSafe for Settings<'a, R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,