pub struct RegistryPolicy {
pub allow_all_domains: bool,
}Expand description
Policy governing which registry hosts may receive the access token.
Fields§
§allow_all_domains: boolPermit registries outside Google Artifact Registry when explicitly requested.
Implementations§
Source§impl RegistryPolicy
impl RegistryPolicy
Sourcepub fn parse(&self, input: &str) -> Result<Option<RegistryUrl>, AuthError>
pub fn parse(&self, input: &str) -> Result<Option<RegistryUrl>, AuthError>
Parse a registry URL. Untrusted hosts return Ok(None); malformed URLs return an error.
Sourcepub fn parse_npm_key(&self, key: &str) -> Result<Option<RegistryUrl>, AuthError>
pub fn parse_npm_key(&self, key: &str) -> Result<Option<RegistryUrl>, AuthError>
Parse an npm credential key (//host/path/) using the same policy.
Trait Implementations§
Source§impl Clone for RegistryPolicy
impl Clone for RegistryPolicy
impl Copy for RegistryPolicy
Auto Trait Implementations§
impl Freeze for RegistryPolicy
impl RefUnwindSafe for RegistryPolicy
impl Send for RegistryPolicy
impl Sync for RegistryPolicy
impl Unpin for RegistryPolicy
impl UnsafeUnpin for RegistryPolicy
impl UnwindSafe for RegistryPolicy
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