pub struct RegistryConfig {
pub name: String,
pub url: String,
pub username: Option<String>,
pub password: Option<String>,
pub token: Option<String>,
pub default: bool,
pub priority: u32,
}Expand description
Registry configuration
Fields§
§name: StringRegistry name (for reference)
url: StringRegistry URL (Simple API endpoint)
username: Option<String>Username for basic auth
password: Option<String>Password for basic auth (supports ${ENV_VAR} interpolation)
token: Option<String>Bearer token (supports ${ENV_VAR} interpolation)
default: boolWhether this is the default registry for publishing
priority: u32Priority (lower = higher priority, default = 100)
Implementations§
Source§impl RegistryConfig
impl RegistryConfig
Sourcepub fn new(name: impl Into<String>, url: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, url: impl Into<String>) -> Self
Create a new registry config
Sourcepub fn with_basic_auth(self, username: String, password: String) -> Self
pub fn with_basic_auth(self, username: String, password: String) -> Self
Set basic auth credentials
Sourcepub fn with_token(self, token: String) -> Self
pub fn with_token(self, token: String) -> Self
Set bearer token auth
Sourcepub fn resolve_credentials(&self) -> Result<ResolvedCredentials>
pub fn resolve_credentials(&self) -> Result<ResolvedCredentials>
Resolve environment variables in credentials
Trait Implementations§
Source§impl Clone for RegistryConfig
impl Clone for RegistryConfig
Source§fn clone(&self) -> RegistryConfig
fn clone(&self) -> RegistryConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 RegistryConfig
impl Debug for RegistryConfig
Source§impl<'de> Deserialize<'de> for RegistryConfig
impl<'de> Deserialize<'de> for RegistryConfig
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 RegistryConfig
impl RefUnwindSafe for RegistryConfig
impl Send for RegistryConfig
impl Sync for RegistryConfig
impl Unpin for RegistryConfig
impl UnwindSafe for RegistryConfig
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