[][src]Struct css_inline::InlineOptions

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>>,
}

Configuration options for CSS inlining process.

Fields

inline_style_tags: bool

Whether to inline CSS from "style" tags.

remove_style_tags: bool

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

impl<'a> InlineOptions<'a>[src]

pub fn compact() -> Self[src]

Options for "compact" HTML output.

pub fn inline_style_tags(self, inline_style_tags: bool) -> Self[src]

Override whether "style" tags should be inlined.

pub fn remove_style_tags(self, remove_style_tags: bool) -> Self[src]

Override whether "style" tags should be removed after processing.

pub fn base_url(self, base_url: Option<Url>) -> Self[src]

Set base URL that will be used for loading external stylesheets via relative URLs.

pub fn load_remote_stylesheets(self, load_remote_stylesheets: bool) -> Self[src]

Override whether remote stylesheets should be loaded.

pub fn extra_css(self, extra_css: Option<Cow<'a, str>>) -> Self[src]

Set additional CSS to inline.

pub fn build(self) -> CSSInliner<'a>[src]

Create a new CSSInliner instance from this options.

Trait Implementations

impl<'a> Debug for InlineOptions<'a>[src]

impl<'_> Default for InlineOptions<'_>[src]

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

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

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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.