pub struct AppConfig {
pub registry: RegistryConfig,
pub file_path: String,
pub large_layer_threshold: u64,
pub max_concurrent: usize,
pub retry_attempts: usize,
pub verbose: bool,
pub dry_run: bool,
}Fields§
§registry: RegistryConfig§file_path: String§large_layer_threshold: u64§max_concurrent: usize§retry_attempts: usize§verbose: bool§dry_run: boolImplementations§
Source§impl AppConfig
impl AppConfig
pub fn new( registry_url: &str, repository: &str, tag: &str, file_path: String, ) -> Result<Self>
pub fn with_auth(self, username: String, password: String) -> Self
pub fn with_optional_auth( self, username: Option<String>, password: Option<String>, ) -> Result<Self>
pub fn has_auth(&self) -> bool
pub fn with_large_layer_threshold(self, threshold: u64) -> Self
pub fn with_timeout(self, timeout: u64) -> Self
pub fn with_skip_tls(self, skip_tls: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
pub fn with_dry_run(self, dry_run: bool) -> Self
pub fn with_max_concurrent(self, max_concurrent: usize) -> Self
pub fn with_retry_attempts(self, retry_attempts: usize) -> Self
pub fn parse_repository_url(url: &str) -> Result<(String, String, String)>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnwindSafe for AppConfig
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