pub struct CachedShape {
pub lines: Vec<ShapedLine>,
pub metrics: TextMetrics,
pub mem_size: usize,
}Expand description
A cached shaped text entry, storing the shaped lines and metrics.
Fields§
§lines: Vec<ShapedLine>The shaped lines.
metrics: TextMetricsThe measured metrics.
mem_size: usizeApproximate memory size in bytes.
Implementations§
Source§impl CachedShape
impl CachedShape
Sourcepub fn new(lines: Vec<ShapedLine>, metrics: TextMetrics) -> Self
pub fn new(lines: Vec<ShapedLine>, metrics: TextMetrics) -> Self
Creates a new cached shape entry.
Trait Implementations§
Source§impl Clone for CachedShape
impl Clone for CachedShape
Source§fn clone(&self) -> CachedShape
fn clone(&self) -> CachedShape
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CachedShape
impl RefUnwindSafe for CachedShape
impl Send for CachedShape
impl Sync for CachedShape
impl Unpin for CachedShape
impl UnsafeUnpin for CachedShape
impl UnwindSafe for CachedShape
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