[][src]Struct deno::ModuleSpecifier

pub struct 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]

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]

Converts a string representing an absulute URL into a ModuleSpecifier.

pub fn resolve_url_or_path(
    specifier: &str
) -> Result<ModuleSpecifier, ModuleResolutionError>
[src]

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]

impl Eq for ModuleSpecifier[src]

impl PartialEq<ModuleSpecifier> for ModuleSpecifier[src]

impl PartialEq<String> for ModuleSpecifier[src]

impl Display for ModuleSpecifier[src]

impl Debug for ModuleSpecifier[src]

impl Hash for ModuleSpecifier[src]

impl StructuralPartialEq for ModuleSpecifier[src]

impl StructuralEq for ModuleSpecifier[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]