Struct css_inline::CSSInliner
source · pub struct CSSInliner<'a> { /* private fields */ }
Expand description
Customizable CSS inliner.
Implementations§
source§impl<'a> CSSInliner<'a>
impl<'a> CSSInliner<'a>
sourcepub const fn new(options: InlineOptions<'a>) -> Self
pub const fn new(options: InlineOptions<'a>) -> Self
Create a new CSSInliner
instance with given options.
sourcepub fn options() -> InlineOptions<'a>
pub fn options() -> InlineOptions<'a>
Return a default InlineOptions
that can fully configure the CSS inliner.
Examples
Get default InlineOptions
, then change base url
use css_inline::{CSSInliner, Url};
let url = Url::parse("https://api.example.com")?;
let inliner = CSSInliner::options()
.base_url(Some(url))
.build();