pub struct MetaBuilder {
pub scope: String,
pub name: String,
}
Expand description
Creates a builder for Meta
Fields§
§scope: String
§name: String
Implementations§
Source§impl MetaBuilder
Creates a builder for Meta
impl MetaBuilder
Creates a builder for Meta
Sourcepub fn from_npm_comp_name<T: GetProviderScope>(
gts: impl AsRef<T>,
value: impl Into<String>,
) -> Self
pub fn from_npm_comp_name<T: GetProviderScope>( gts: impl AsRef<T>, value: impl Into<String>, ) -> Self
Convert JSR-to-npm equivalent package name to normal one
It needs either crate::fetcher::FetcherBuilder or crate::fetcher::Fetcher since it needs crate::fetcher::FetcherBuilder::provider_scope to detect the scope owned in npm-side
§Panics
Throw panic if it cant parse, use Self::try_from_npm_comp_name to handle it
Sourcepub fn try_from_npm_comp_name<T: GetProviderScope>(
gts: impl AsRef<T>,
value: impl Into<String>,
) -> Result<Self, NpmCompParseError>
pub fn try_from_npm_comp_name<T: GetProviderScope>( gts: impl AsRef<T>, value: impl Into<String>, ) -> Result<Self, NpmCompParseError>
Convert JSR-to-npm equivalent package name to normal one, as Result
It needs either crate::fetcher::FetcherBuilder or crate::fetcher::Fetcher since it needs crate::fetcher::FetcherBuilder::provider_scope to detect the scope owned in npm-side
Sourcepub fn from_info<T: AsRef<U>, U: GetInfo>(info: T) -> Self
pub fn from_info<T: AsRef<U>, U: GetInfo>(info: T) -> Self
Set scope
and name
from struct that extends crate::info::GetInfo trait
Trait Implementations§
Source§impl AsRef<MetaBuilder> for MetaBuilder
impl AsRef<MetaBuilder> for MetaBuilder
Source§fn as_ref(&self) -> &MetaBuilder
fn as_ref(&self) -> &MetaBuilder
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for MetaBuilder
impl Clone for MetaBuilder
Source§fn clone(&self) -> MetaBuilder
fn clone(&self) -> MetaBuilder
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 MetaBuilder
impl Debug for MetaBuilder
Source§impl PartialEq for MetaBuilder
impl PartialEq for MetaBuilder
impl Eq for MetaBuilder
impl StructuralPartialEq for MetaBuilder
Auto Trait Implementations§
impl Freeze for MetaBuilder
impl RefUnwindSafe for MetaBuilder
impl Send for MetaBuilder
impl Sync for MetaBuilder
impl Unpin for MetaBuilder
impl UnwindSafe for MetaBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.