[−][src]Struct azul_core::app_resources::TextCache
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
Auto Trait Implementations
impl RefUnwindSafe for TextCache
impl Send for TextCache
impl Sync for TextCache
impl Unpin for TextCache
impl UnwindSafe for TextCache
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,