pub struct Identity {
pub scope: String,
pub name: String,
pub git_url: String,
}Expand description
Package identity derived from the repository URL: the npm scope (@owner),
the npm/package name (repository basename), and the npm git URL. Assumes the
npm scope matches the repository owner unless overridden.
Fields§
§scope: String§name: String§git_url: StringImplementations§
Source§impl Identity
impl Identity
Sourcepub fn from_repository(
repository: &str,
scope_override: Option<&str>,
) -> Result<Self, ProjectError>
pub fn from_repository( repository: &str, scope_override: Option<&str>, ) -> Result<Self, ProjectError>
Derive identity from a repository URL. scope_override (e.g. @acme) is
used verbatim when present; otherwise the scope is @<owner>.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnsafeUnpin for Identity
impl UnwindSafe for Identity
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