pub struct Config { /* private fields */ }Expand description
Configuration for a Client.
Implementations§
Source§impl Config
impl Config
Sourcepub fn insecure_registry(self, insecure: bool) -> Self
pub fn insecure_registry(self, insecure: bool) -> Self
Whether to use an insecure HTTP connection to the registry.
Sourcepub fn accept_invalid_certs(self, accept_invalid_certs: bool) -> Self
pub fn accept_invalid_certs(self, accept_invalid_certs: bool) -> Self
Set whether or not to accept invalid certificates.
Sourcepub fn add_root_certificate(self, certificate: Certificate) -> Self
pub fn add_root_certificate(self, certificate: Certificate) -> Self
Add a root certificate the client should trust for TLS verification
Sourcepub fn accepted_types(
self,
accepted_types: Option<Vec<(MediaTypes, Option<f64>)>>,
) -> Self
pub fn accepted_types( self, accepted_types: Option<Vec<(MediaTypes, Option<f64>)>>, ) -> Self
Set custom Accept headers
Sourcepub fn user_agent(self, user_agent: Option<String>) -> Self
pub fn user_agent(self, user_agent: Option<String>) -> Self
Set the user-agent to be used for registry authentication.
Sourcepub fn username(self, user: Option<String>) -> Self
pub fn username(self, user: Option<String>) -> Self
Set the username to be used for registry authentication.
Sourcepub fn password(self, password: Option<String>) -> Self
pub fn password(self, password: Option<String>) -> Self
Set the password to be used for registry authentication.
Sourcepub fn read_credentials<T: Read>(self, reader: T) -> Self
pub fn read_credentials<T: Read>(self, reader: T) -> Self
Read credentials from a JSON config file
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin 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