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§
sourcefn retrieve(&self, location: &str) -> Result<String>
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.
sourcefn retrieve_from_url(&self, url: &str) -> Result<String>
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.
sourcefn retrieve_from_path(&self, path: &str) -> Result<String>
fn retrieve_from_path(&self, path: &str) -> Result<String>
sourcefn unsupported(&self, reason: &str) -> InlineError
fn unsupported(&self, reason: &str) -> InlineError
Return the “Unsupported” kind of error.