pub struct RuntimePaths {
pub resources: PathBuf,
pub user_data: PathBuf,
pub cache: PathBuf,
pub dictionaries: PathBuf,
}Fields§
§resources: PathBufThe immutable packaged bundle.
user_data: PathBufThe journal, learned glosses and hand-written translations.
cache: PathBuf§dictionaries: PathBufThe generation directory holding the mutable working copies (user_data/dictionaries/<content id>).
Implementations§
Source§impl RuntimePaths
impl RuntimePaths
Sourcepub fn resource(&self, name: &str) -> PathBuf
pub fn resource(&self, name: &str) -> PathBuf
资源包里的文件。名字是 assets 里的常量,或已被 helpcode::custom_schema_stem 化成单个普通路径成分的自定义辅助码名。现名文件缺席、assets::LEGACY_NAMES 里的旧名文件在场时返回旧名路径。
pub fn user(&self, name: &str) -> PathBuf
Sourcepub fn dictionary(&self, name: &str) -> PathBuf
pub fn dictionary(&self, name: &str) -> PathBuf
与 resource 一样,现名缺席而旧名文件在场时返回旧名。
Trait Implementations§
Source§impl Clone for RuntimePaths
impl Clone for RuntimePaths
Source§impl Debug for RuntimePaths
impl Debug for RuntimePaths
Source§impl Default for RuntimePaths
impl Default for RuntimePaths
impl Eq for RuntimePaths
Source§impl PartialEq for RuntimePaths
impl PartialEq for RuntimePaths
impl StructuralPartialEq for RuntimePaths
Auto Trait Implementations§
impl Freeze for RuntimePaths
impl RefUnwindSafe for RuntimePaths
impl Send for RuntimePaths
impl Sync for RuntimePaths
impl Unpin for RuntimePaths
impl UnsafeUnpin for RuntimePaths
impl UnwindSafe for RuntimePaths
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
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.