[−][src]Struct deno_core::ModuleSpecifier
Resolved module specifier
Implementations
impl ModuleSpecifier
[src]
pub fn as_url(&self) -> &Url
[src]
pub fn as_str(&self) -> &str
[src]
pub fn resolve_import(
specifier: &str,
base: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
[src]
specifier: &str,
base: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
Resolves module using this algorithm: https://html.spec.whatwg.org/multipage/webappapis.html#resolve-a-module-specifier
pub fn resolve_url(
url_str: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
[src]
url_str: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
Converts a string representing an absolute URL into a ModuleSpecifier.
pub fn resolve_url_or_path(
specifier: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
[src]
specifier: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
Takes a string representing either an absolute URL or a file path, as it may be passed to deno as a command line argument. The string is interpreted as a URL if it starts with a valid URI scheme, e.g. 'http:' or 'file:' or 'git+ssh:'. If not, it's interpreted as a file path; if it is a relative path it's resolved relative to the current working directory.
pub fn resolve_path(
path_str: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
[src]
path_str: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
Converts a string representing a relative or absolute path into a ModuleSpecifier. A relative path is considered relative to the current working directory.
Trait Implementations
impl Clone for ModuleSpecifier
[src]
pub fn clone(&self) -> ModuleSpecifier
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ModuleSpecifier
[src]
impl Display for ModuleSpecifier
[src]
impl Eq for ModuleSpecifier
[src]
impl From<Url> for ModuleSpecifier
[src]
impl Hash for ModuleSpecifier
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for ModuleSpecifier
[src]
pub fn cmp(&self, other: &ModuleSpecifier) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<ModuleSpecifier> for ModuleSpecifier
[src]
pub fn eq(&self, other: &ModuleSpecifier) -> bool
[src]
pub fn ne(&self, other: &ModuleSpecifier) -> bool
[src]
impl PartialEq<String> for ModuleSpecifier
[src]
pub fn eq(&self, other: &String) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<ModuleSpecifier> for ModuleSpecifier
[src]
pub fn partial_cmp(&self, other: &ModuleSpecifier) -> Option<Ordering>
[src]
pub fn lt(&self, other: &ModuleSpecifier) -> bool
[src]
pub fn le(&self, other: &ModuleSpecifier) -> bool
[src]
pub fn gt(&self, other: &ModuleSpecifier) -> bool
[src]
pub fn ge(&self, other: &ModuleSpecifier) -> bool
[src]
impl Serialize for ModuleSpecifier
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for ModuleSpecifier
[src]
impl StructuralPartialEq for ModuleSpecifier
[src]
Auto Trait Implementations
impl RefUnwindSafe for ModuleSpecifier
[src]
impl Send for ModuleSpecifier
[src]
impl Sync for ModuleSpecifier
[src]
impl Unpin for ModuleSpecifier
[src]
impl UnwindSafe for ModuleSpecifier
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,