pub struct LocalFont { /* private fields */ }Expand description
A self-hosted font.
ⓘ
static INTER: LazyLock<LocalFont> = LazyLock::new(|| {
LocalFont::new("Inter", asset!("fonts/inter-var.woff2")).weight("100 900")
});
// layout.rs
pub fn metadata() -> Metadata { INTER.metadata() }
pub fn Layout(children: Children) -> impl View { div![INTER.style(), children] }Implementations§
Source§impl LocalFont
impl LocalFont
Trait Implementations§
impl Eq for LocalFont
impl StructuralPartialEq for LocalFont
Auto Trait Implementations§
impl Forget for LocalFont
impl Freeze for LocalFont
impl Move for LocalFont
impl RefUnwindSafe for LocalFont
impl Send for LocalFont
impl Sync for LocalFont
impl Unpin for LocalFont
impl UnsafeUnpin for LocalFont
impl UnwindSafe for LocalFont
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.