Struct manifest::FontsManifest
source · pub struct FontsManifest {
pub families: Vec<Family>,
}
Expand description
A collection of metadata about font families.
Fields§
§families: Vec<Family>
List of font families.
Implementations§
source§impl FontsManifest
impl FontsManifest
sourcepub fn load_from_file(path: &Path) -> Result<FontManifestWrapper, Error>
pub fn load_from_file(path: &Path) -> Result<FontManifestWrapper, Error>
Tries to deserialize a v1 or v2 manifest from a JSON file.
(Also performs some file path cleanup in v1 manifests.)
Trait Implementations§
source§impl Debug for FontsManifest
impl Debug for FontsManifest
source§impl<'de> Deserialize<'de> for FontsManifest
impl<'de> Deserialize<'de> for FontsManifest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for FontsManifest
impl Serialize for FontsManifest
source§impl TryFrom<FontsManifest> for FontsManifest
impl TryFrom<FontsManifest> for FontsManifest
source§fn try_from(old: FontsManifestV1) -> Result<FontsManifest, Error>
fn try_from(old: FontsManifestV1) -> Result<FontsManifest, Error>
Converts a v1 [manifest::FontsManifest
] to a v2 [manifest::v2::Manifest
].
This is purely an in-memory conversion, and does not load character sets for local files.
Auto Trait Implementations§
impl Freeze for FontsManifest
impl RefUnwindSafe for FontsManifest
impl Send for FontsManifest
impl Sync for FontsManifest
impl Unpin for FontsManifest
impl UnwindSafe for FontsManifest
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