pub struct NpmrcParser { /* private fields */ }Expand description
Regular-expression-based parser for .npmrc lines.
Implementations§
Source§impl NpmrcParser
impl NpmrcParser
Sourcepub fn new(allow_all_domains: bool) -> Result<Self, AuthError>
pub fn new(allow_all_domains: bool) -> Result<Self, AuthError>
Creates a new parser instance.
If allow_all_domains is false, only *-npm.pkg.dev Artifact Registry domains match.
Sourcepub fn parse_line(&self, line: &str) -> Result<NpmrcConfigType, AuthError>
pub fn parse_line(&self, line: &str) -> Result<NpmrcConfigType, AuthError>
Parses a single .npmrc configuration line into a NpmrcConfigType.
Auto Trait Implementations§
impl Freeze for NpmrcParser
impl RefUnwindSafe for NpmrcParser
impl Send for NpmrcParser
impl Sync for NpmrcParser
impl Unpin for NpmrcParser
impl UnsafeUnpin for NpmrcParser
impl UnwindSafe for NpmrcParser
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