pub struct FontMemoryStats {Show 14 fields
pub primary_bytes: usize,
pub fallback_cjk_bytes: usize,
pub bold_bytes: usize,
pub italic_bytes: usize,
pub mono_bytes: usize,
pub mono_bold_bytes: usize,
pub serif_bytes: usize,
pub custom_font_bytes: usize,
pub mapped_font_bytes: usize,
pub heap_font_bytes: usize,
pub glyph_cache_entries: usize,
pub glyph_cache_bitmap_bytes: usize,
pub styled_glyph_cache_entries: usize,
pub styled_glyph_cache_bitmap_bytes: usize,
}Expand description
字体与字形位图缓存内存占用快照(供性能剖析与四层内存账本使用)。
Fields§
§primary_bytes: usize§fallback_cjk_bytes: usize§bold_bytes: usize§italic_bytes: usize§mono_bytes: usize§mono_bold_bytes: usize§serif_bytes: usize§custom_font_bytes: usize§mapped_font_bytes: usize通过 OS 只读共享文件映射(MapViewOfFile / mmap)加载的字体字节(不占用 Rust 私有堆)。
heap_font_bytes: usize真正驻留在进程私有堆上的字体字节(自定义动态注册字体或不支持 mmap 的回退)。
glyph_cache_entries: usize§glyph_cache_bitmap_bytes: usize§styled_glyph_cache_entries: usize§styled_glyph_cache_bitmap_bytes: usizeImplementations§
Source§impl FontMemoryStats
impl FontMemoryStats
Sourcepub const fn total_raw_font_bytes(&self) -> usize
pub const fn total_raw_font_bytes(&self) -> usize
原始 TTF/TTC 字体文件字节总计(只读映射 + 私有堆)。
Sourcepub const fn total_bitmap_bytes(&self) -> usize
pub const fn total_bitmap_bytes(&self) -> usize
缓存的 CPU 抗锯齿字形位图总字节(含彩色 Emoji RGBA8)。
Trait Implementations§
Source§impl Clone for FontMemoryStats
impl Clone for FontMemoryStats
impl Copy for FontMemoryStats
Source§impl Debug for FontMemoryStats
impl Debug for FontMemoryStats
Source§impl Default for FontMemoryStats
impl Default for FontMemoryStats
impl Eq for FontMemoryStats
Source§impl PartialEq for FontMemoryStats
impl PartialEq for FontMemoryStats
impl StructuralPartialEq for FontMemoryStats
Auto Trait Implementations§
impl Forget for FontMemoryStats
impl Freeze for FontMemoryStats
impl Move for FontMemoryStats
impl RefUnwindSafe for FontMemoryStats
impl Send for FontMemoryStats
impl Sync for FontMemoryStats
impl Unpin for FontMemoryStats
impl UnsafeUnpin for FontMemoryStats
impl UnwindSafe for FontMemoryStats
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。