pub struct CssLinkOptions { /* private fields */ }Expand description
Configures Link-mode CSS filenames and public hrefs.
Implementations§
Source§impl CssLinkOptions
impl CssLinkOptions
Sourcepub fn try_new(
file_name_template: String,
public_base: Option<String>,
) -> Result<Self>
pub fn try_new( file_name_template: String, public_base: Option<String>, ) -> Result<Self>
Create validated Link-mode CSS options.
§Errors
Returns ParserError::Css when the template contains unknown tokens,
unsafe path bytes, or an unsafe public base.
Sourcepub fn resolve(&self, tag_name: &str, css_content: &str) -> CssLinkHref
pub fn resolve(&self, tag_name: &str, css_content: &str) -> CssLinkHref
Resolve the local filename and public href for a component stylesheet.
Results are cached by component tag. A CssLinkOptions value should be
scoped to one build/component registry where each tag maps to exactly
one stylesheet.
Sourcepub fn file_name_template(&self) -> &str
pub fn file_name_template(&self) -> &str
File name template used for Link-mode CSS files.
Sourcepub fn public_base(&self) -> Option<&str>
pub fn public_base(&self) -> Option<&str>
Optional public base prepended to Link-mode CSS hrefs.
Trait Implementations§
Source§impl Clone for CssLinkOptions
impl Clone for CssLinkOptions
Source§fn clone(&self) -> CssLinkOptions
fn clone(&self) -> CssLinkOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CssLinkOptions
impl Debug for CssLinkOptions
Source§impl Default for CssLinkOptions
impl Default for CssLinkOptions
impl Eq for CssLinkOptions
Source§impl PartialEq for CssLinkOptions
impl PartialEq for CssLinkOptions
Auto Trait Implementations§
impl Freeze for CssLinkOptions
impl RefUnwindSafe for CssLinkOptions
impl Send for CssLinkOptions
impl Sync for CssLinkOptions
impl Unpin for CssLinkOptions
impl UnsafeUnpin for CssLinkOptions
impl UnwindSafe for CssLinkOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more