pub struct ProviderConfig {
pub headers: HashMap<String, String>,
pub timeout: Option<u64>,
pub max_redirects: Option<u32>,
pub user_agent: Option<String>,
pub accept_invalid_certs: bool,
pub credentials: HashMap<String, String>,
pub provider_settings: HashMap<String, String>,
pub max_file_size: Option<u64>,
pub use_compression: bool,
pub proxy: Option<String>,
}Expand description
Universal configuration for all Git providers
Fields§
§headers: HashMap<String, String>Custom HTTP headers to include in requests
timeout: Option<u64>Request timeout in seconds (None for default)
max_redirects: Option<u32>Maximum number of redirects to follow
user_agent: Option<String>User agent string to use for requests
accept_invalid_certs: boolWhether to accept invalid SSL certificates
credentials: HashMap<String, String>Authentication credentials (varies by provider)
provider_settings: HashMap<String, String>Provider-specific settings
max_file_size: Option<u64>Maximum file size to download in bytes
use_compression: boolWhether to use compression for requests
proxy: Option<String>Custom proxy URL
Implementations§
Source§impl ProviderConfig
impl ProviderConfig
Sourcepub fn with_timeout(self, timeout: u64) -> Self
pub fn with_timeout(self, timeout: u64) -> Self
Sourcepub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
pub fn with_user_agent(self, user_agent: impl Into<String>) -> Self
Sourcepub fn with_accept_invalid_certs(self, accept: bool) -> Self
pub fn with_accept_invalid_certs(self, accept: bool) -> Self
Set whether to accept invalid SSL certificates
§Arguments
accept- Whether to accept invalid certificates
Sourcepub fn with_credential(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_credential( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Set authentication credentials
§Arguments
key- Credential key (e.g., “token”, “username”)value- Credential value
Sourcepub fn with_provider_setting(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_provider_setting( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Sourcepub fn with_max_file_size(self, size: u64) -> Self
pub fn with_max_file_size(self, size: u64) -> Self
Sourcepub fn with_proxy(self, proxy: impl Into<String>) -> Self
pub fn with_proxy(self, proxy: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
Source§fn clone(&self) -> ProviderConfig
fn clone(&self) -> ProviderConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProviderConfig
impl Debug for ProviderConfig
Auto Trait Implementations§
impl Freeze for ProviderConfig
impl RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl UnsafeUnpin for ProviderConfig
impl UnwindSafe for ProviderConfig
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