pub struct TextManager { /* private fields */ }
Implementations§
Source§impl TextManager
impl TextManager
pub fn new<P: AsRef<Path>>(root: P) -> Self
pub fn resolve_file(&self, relative_path: &str) -> PathBuf
pub fn add_file(&mut self, relative_path: &str) -> ValkyrieResult<FileID>
pub fn add_text( &mut self, file: impl Into<String>, text: impl Into<String>, ) -> FileID
pub fn get_text(&self, id: FileID) -> &str
Trait Implementations§
Source§impl Cache<usize> for TextManager
impl Cache<usize> for TextManager
Auto Trait Implementations§
impl Freeze for TextManager
impl RefUnwindSafe for TextManager
impl Send for TextManager
impl Sync for TextManager
impl Unpin for TextManager
impl UnwindSafe for TextManager
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