[][src]Struct azul_core::app_resources::TextCache

pub struct TextCache {
    pub string_cache: FastHashMap<TextId, Words>,
}

Cache for accessing large amounts of text

Fields

string_cache: FastHashMap<TextId, Words>

Mapping from the TextID to the actual, UTF-8 String

This is stored outside of the actual glyph calculation, because usually you don't need the string, except for rebuilding a cached string (for example, when the font is changed)

Implementations

impl TextCache[src]

pub fn add_text(&mut self, words: Words) -> TextId[src]

Add a new, large text to the resources

pub fn get_text(&self, text_id: &TextId) -> Option<&Words>[src]

pub fn delete_text(&mut self, id: TextId)[src]

Removes a string from the string cache, but not the layouted text cache

pub fn clear_all_texts(&mut self)[src]

Trait Implementations

impl Clone for TextCache[src]

impl Debug for TextCache[src]

impl Default for TextCache[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.