pub struct TextSymbol {
pub units: TextUnit,
pub cohesion: TextCohesion,
}Expand description
๐ ๐งฑ ๐ Layout participation record for a single text symbol.
A TextSymbol describes how a unit of text participates in layout:
how much inline space it consumes and what spatial constraints apply under limited space.
It carries no identity or semantic meaning beyond layout behavior.
Fieldsยง
ยงunits: TextUnitInline space consumed by this symbol when laid out as a whole.
cohesion: TextCohesionSpatial cohesion rules applied to this symbol under limited space.
Implementationsยง
Sourceยงimpl TextSymbol
impl TextSymbol
Sourcepub const fn new(units: TextUnit, cohesion: TextCohesion) -> Self
pub const fn new(units: TextUnit, cohesion: TextCohesion) -> Self
Creates a span from symbol indices and consumed units.
Trait Implementationsยง
Sourceยงimpl Clone for TextSymbol
impl Clone for TextSymbol
Sourceยงimpl ConstInitCore for TextSymbol
impl ConstInitCore for TextSymbol
impl Copy for TextSymbol
Sourceยงimpl Debug for TextSymbol
impl Debug for TextSymbol
impl Eq for TextSymbol
Sourceยงimpl Hash for TextSymbol
impl Hash for TextSymbol
Sourceยงimpl PartialEq for TextSymbol
impl PartialEq for TextSymbol
impl StructuralPartialEq for TextSymbol
Auto Trait Implementationsยง
impl Freeze for TextSymbol
impl RefUnwindSafe for TextSymbol
impl Send for TextSymbol
impl Sync for TextSymbol
impl Unpin for TextSymbol
impl UnsafeUnpin for TextSymbol
impl UnwindSafe for TextSymbol
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> ByteSized for T
impl<T> ByteSized for T
Sourceยงconst BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
The alignment of this type in bytes.
Sourceยงfn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Returns the alignment of this type in bytes.