Struct tough::Limits [−][src]
Limits used when fetching repository metadata.
These limits are implemented to prevent endless data attacks. Clients must ensure these values are set higher than what would reasonably be expected by a repository, but not so high that the amount of data could interfere with the system.
max_root_size
and max_timestamp_size
are the maximum size for the root.json
and
timestamp.json
files, respectively, downloaded from the repository. These must be
sufficiently large such that future updates to your repository’s key management strategy
will still be supported, but sufficiently small such that you are protected against an
endless data attack (defined by TUF as an attacker responding to clients with extremely
large files that interfere with the client’s system).
The Default
implementation sets the following values:
max_root_size
: 1 MiBmax_targets_size
: 10 MiBmax_timestamp_size
: 1 MiBmax_root_updates
: 1024
Fields
max_root_size: u64
The maximum allowable size in bytes for downloaded root.json files.
max_targets_size: u64
The maximum allowable size in bytes for downloaded targets.json file if the size is not listed in snapshots.json. This setting is ignored if the size of targets.json is in the signed snapshots.json file.
max_timestamp_size: u64
The maximum allowable size in bytes for the downloaded timestamp.json file.
max_root_updates: u64
The maximum number of updates to root.json to download.
Trait Implementations
impl Clone for Limits
[src]
impl Copy for Limits
[src]
impl Debug for Limits
[src]
impl Default for Limits
[src]
Auto Trait Implementations
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnwindSafe for Limits
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,