pub struct NpmRegistryUrl(/* private fields */);Expand description
npm registry URL metadata.
Implementations§
Source§impl NpmRegistryUrl
impl NpmRegistryUrl
Sourcepub fn new(input: &str) -> Result<NpmRegistryUrl, NpmTextError>
pub fn new(input: &str) -> Result<NpmRegistryUrl, NpmTextError>
Creates registry URL metadata.
§Errors
Returns NpmTextError when input is empty, contains whitespace, or is not HTTP(S)-shaped.
Trait Implementations§
Source§impl Clone for NpmRegistryUrl
impl Clone for NpmRegistryUrl
Source§fn clone(&self) -> NpmRegistryUrl
fn clone(&self) -> NpmRegistryUrl
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 NpmRegistryUrl
impl Debug for NpmRegistryUrl
Source§impl Hash for NpmRegistryUrl
impl Hash for NpmRegistryUrl
Source§impl Ord for NpmRegistryUrl
impl Ord for NpmRegistryUrl
Source§fn cmp(&self, other: &NpmRegistryUrl) -> Ordering
fn cmp(&self, other: &NpmRegistryUrl) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NpmRegistryUrl
impl PartialEq for NpmRegistryUrl
Source§fn eq(&self, other: &NpmRegistryUrl) -> bool
fn eq(&self, other: &NpmRegistryUrl) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for NpmRegistryUrl
impl PartialOrd for NpmRegistryUrl
impl Eq for NpmRegistryUrl
impl StructuralPartialEq for NpmRegistryUrl
Auto Trait Implementations§
impl Freeze for NpmRegistryUrl
impl RefUnwindSafe for NpmRegistryUrl
impl Send for NpmRegistryUrl
impl Sync for NpmRegistryUrl
impl Unpin for NpmRegistryUrl
impl UnsafeUnpin for NpmRegistryUrl
impl UnwindSafe for NpmRegistryUrl
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