pub struct LinkProps {
pub font: Font,
pub preload: bool,
}Available on crate feature
view only.Expand description
Loads a Font into the page.
Renders the stylesheet <link> that pulls in the font’s @font-face rules,
and, by default, a rel="preload" <link> for the first source of each
face so the browser can start fetching the files before the CSS is parsed.
Ok(view! {
topcoat::font::link(font: LAVISHLY_YOURS)
})Fields§
§font: FontThe font to load.
preload: boolWhether to emit rel="preload" links for the font’s sources ahead of
the stylesheet.
Implementations§
Source§impl LinkProps
impl LinkProps
Sourcepub fn builder() -> LinkPropsBuilder<font>
pub fn builder() -> LinkPropsBuilder<font>
Returns a LinkPropsBuilder with no properties set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkProps
impl RefUnwindSafe for LinkProps
impl Send for LinkProps
impl Sync for LinkProps
impl Unpin for LinkProps
impl UnsafeUnpin for LinkProps
impl UnwindSafe for LinkProps
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