pub struct Config { /* private fields */ }Expand description
Configuration for a TUF Client.
§Defaults
The following values are considered reasonably safe defaults, however these values may change
as this crate moves out of beta. If you are concered about them changing, you should use the
ConfigBuilder and set your own values.
let config = Config::default();
assert_eq!(config.max_root_length(), &Some(500 * 1024));
assert_eq!(config.max_timestamp_length(), &Some(16 * 1024));
assert_eq!(config.max_snapshot_length(), &Some(2000000));
assert_eq!(config.max_targets_length(), &Some(5000000));
assert_eq!(config.max_delegation_depth(), 8);Implementations§
Source§impl Config
impl Config
Sourcepub fn build() -> ConfigBuilder
pub fn build() -> ConfigBuilder
Initialize a ConfigBuilder with the default values.
Sourcepub fn max_root_length(&self) -> &Option<usize>
pub fn max_root_length(&self) -> &Option<usize>
Return the optional maximum root metadata length.
Sourcepub fn max_timestamp_length(&self) -> &Option<usize>
pub fn max_timestamp_length(&self) -> &Option<usize>
Return the optional maximum timestamp metadata size.
Sourcepub fn max_snapshot_length(&self) -> &Option<usize>
pub fn max_snapshot_length(&self) -> &Option<usize>
Return the optional maximum snapshot metadata size.
Sourcepub fn max_targets_length(&self) -> &Option<usize>
pub fn max_targets_length(&self) -> &Option<usize>
Return the optional maximum targets metadata size.
Sourcepub fn max_delegation_depth(&self) -> u32
pub fn max_delegation_depth(&self) -> u32
The maximum number of steps used when walking the delegation graph.
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more