Trait css_inline::StylesheetResolver

source ·
pub trait StylesheetResolver: Send + Sync {
    // Provided methods
    fn retrieve(&self, location: &str) -> Result<String> { ... }
    fn retrieve_from_url(&self, url: &str) -> Result<String> { ... }
    fn retrieve_from_path(&self, path: &str) -> Result<String> { ... }
    fn unsupported(&self, reason: &str) -> InlineError { ... }
}
Expand description

Blocking way of resolving stylesheets from various sources.

Provided Methods§

source

fn retrieve(&self, location: &str) -> Result<String>

Retrieve a stylesheet from a network or local filesystem location.

§Errors

Any network or filesystem related error, or an error during response parsing.

source

fn retrieve_from_url(&self, url: &str) -> Result<String>

Retrieve a stylesheet from a network location.

§Errors

Any network-related error, or an error during response parsing.

source

fn retrieve_from_path(&self, path: &str) -> Result<String>

Retrieve a stylesheet from the local filesystem.

§Errors

Any filesystem-related error.

source

fn unsupported(&self, reason: &str) -> InlineError

Return the “Unsupported” kind of error.

Implementors§