[−][src]Struct tough::Limits
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.
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,
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>,