pub enum FontAsset {
Path(&'static str),
Bytes {
file_name: &'static str,
data: &'static [u8],
},
}Expand description
Represents a font asset that can be loaded. This can be either a file path or embedded bytes.
Variants§
Path(&'static str)
A file path to a .ttf font file (e.g. "assets/fonts/lexend.ttf").
Bytes
Embedded font bytes, typically via include_bytes!.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FontAsset
impl RefUnwindSafe for FontAsset
impl Send for FontAsset
impl Sync for FontAsset
impl Unpin for FontAsset
impl UnsafeUnpin for FontAsset
impl UnwindSafe for FontAsset
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