Add more Debug implementations
I generally like to implement Debug on these kind of types.
This commit is contained in:
parent
7d50d17369
commit
440d24ffa0
15 changed files with 38 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ pub use font_inner::Font;
|
|||
mod font_inner {
|
||||
use super::*;
|
||||
use aliasable::boxed::AliasableBox;
|
||||
use core::fmt;
|
||||
|
||||
/// A font
|
||||
//
|
||||
|
|
@ -31,6 +32,14 @@ mod font_inner {
|
|||
id: fontdb::ID,
|
||||
}
|
||||
|
||||
impl fmt::Debug for Font {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("Font")
|
||||
.field("id", &self.id)
|
||||
.finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) struct FontTryBuilder<
|
||||
RustybuzzBuilder: for<'this> FnOnce(
|
||||
&'this Arc<dyn AsRef<[u8]> + Send + Sync>,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ pub use fontdb;
|
|||
pub use rustybuzz;
|
||||
|
||||
/// A value borrowed together with an [`FontSystem`]
|
||||
#[derive(Debug)]
|
||||
pub struct BorrowedWithFontSystem<'a, T> {
|
||||
pub(crate) inner: &'a mut T,
|
||||
pub(crate) font_system: &'a mut FontSystem,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use alloc::{
|
|||
use crate::{Attrs, Font};
|
||||
|
||||
/// Access system fonts
|
||||
#[derive(Debug)]
|
||||
pub struct FontSystem {
|
||||
locale: String,
|
||||
db: fontdb::Database,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ use std::{collections::HashMap, sync::Arc};
|
|||
use crate::{Attrs, AttrsOwned, Font};
|
||||
|
||||
/// Access system fonts
|
||||
#[derive(Debug)]
|
||||
pub struct FontSystem {
|
||||
locale: String,
|
||||
db: fontdb::Database,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue