Struct css_inline::InlineOptions
source · pub struct InlineOptions<'a> {
pub inline_style_tags: bool,
pub remove_style_tags: bool,
pub base_url: Option<Url>,
pub load_remote_stylesheets: bool,
pub extra_css: Option<Cow<'a, str>>,
}
Expand description
Configuration options for CSS inlining process.
Fields
Whether to inline CSS from “style” tags.
Remove “style” tags after inlining.
base_url: Option<Url>
Used for loading external stylesheets via relative URLs.
load_remote_stylesheets: bool
Whether remote stylesheets should be loaded or not.
extra_css: Option<Cow<'a, str>>
Additional CSS to inline.
Implementations
sourceimpl<'a> InlineOptions<'a>
impl<'a> InlineOptions<'a>
Override whether “style” tags should be inlined.
Override whether “style” tags should be removed after processing.
sourcepub fn base_url(self, base_url: Option<Url>) -> Self
pub fn base_url(self, base_url: Option<Url>) -> Self
Set base URL that will be used for loading external stylesheets via relative URLs.
sourcepub fn load_remote_stylesheets(self, load_remote_stylesheets: bool) -> Self
pub fn load_remote_stylesheets(self, load_remote_stylesheets: bool) -> Self
Override whether remote stylesheets should be loaded.
sourcepub const fn build(self) -> CSSInliner<'a>
pub const fn build(self) -> CSSInliner<'a>
Create a new CSSInliner
instance from this options.
Trait Implementations
sourceimpl<'a> Debug for InlineOptions<'a>
impl<'a> Debug for InlineOptions<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for InlineOptions<'a>
impl<'a> Send for InlineOptions<'a>
impl<'a> Sync for InlineOptions<'a>
impl<'a> Unpin for InlineOptions<'a>
impl<'a> UnwindSafe for InlineOptions<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more