[−][src]Struct deno::ModuleSpecifier
Resolved module specifier
Methods
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 absulute 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.
Trait Implementations
impl From<Url> for ModuleSpecifier
[src]
impl Clone for ModuleSpecifier
[src]
fn clone(&self) -> ModuleSpecifier
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for ModuleSpecifier
[src]
impl PartialEq<ModuleSpecifier> for ModuleSpecifier
[src]
fn eq(&self, other: &ModuleSpecifier) -> bool
[src]
fn ne(&self, other: &ModuleSpecifier) -> bool
[src]
impl PartialEq<String> for ModuleSpecifier
[src]
impl Display for ModuleSpecifier
[src]
impl Debug for ModuleSpecifier
[src]
impl Hash for ModuleSpecifier
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl StructuralPartialEq for ModuleSpecifier
[src]
impl StructuralEq for ModuleSpecifier
[src]
Auto Trait Implementations
impl Send for ModuleSpecifier
impl Sync for ModuleSpecifier
impl Unpin for ModuleSpecifier
impl UnwindSafe for ModuleSpecifier
impl RefUnwindSafe for ModuleSpecifier
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,