pub enum ParleyLayoutDebug {
Uniform(Layout<()>),
Styled(Layout<[f32; 4]>),
}Expand description
Local wrapper to implement Debug without exposing Parley brush types.
The enum remains public because it appears in generated private-item
documentation, but PreparedTextLayout keeps its instance private. Its
Debug implementation intentionally prints only the layout brush kind and
does not dump shaped text or font data.
§Examples
use ailloli_ui_core::{Color, FontId, TextStyle};
use ailloli_ui_text::{ParleyEngine, prepared::ParleyLayoutDebug};
#[allow(deprecated)] let mut engine = ParleyEngine::new();
let layout = engine.layout_text("x", TextStyle::new(FontId::Ui, 12, Color::WHITE), None);
let wrapped = ParleyLayoutDebug::Uniform(layout);
assert!(format!("{wrapped:?}").contains("Layout"));Variants§
Uniform(Layout<()>)
Layout whose glyph runs carry unit brushes and use a uniform paint color.
Styled(Layout<[f32; 4]>)
Layout whose glyph runs carry per-span linear-RGBA brushes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParleyLayoutDebug
impl !RefUnwindSafe for ParleyLayoutDebug
impl Send for ParleyLayoutDebug
impl Sync for ParleyLayoutDebug
impl Unpin for ParleyLayoutDebug
impl !UnwindSafe for ParleyLayoutDebug
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