pub struct Texts { /* private fields */ }Expand description
Texts holds sokf’s texts, keyed by language, as a tag in lower case, and
by entry, such as limit.hard or units.item.
Implementations§
Source§impl Texts
impl Texts
Sourcepub fn english() -> Texts
pub fn english() -> Texts
english returns sokf’s own English texts, without the layers of the
repository.
Sourcepub fn words(&self, language: &str, entry: &str) -> Option<&str>
pub fn words(&self, language: &str, entry: &str) -> Option<&str>
words returns the words of the entry entry of language.
Sourcepub fn label(&self, language: &str, key: &str) -> Option<String>
pub fn label(&self, language: &str, key: &str) -> Option<String>
label returns the words of the label key in language, with each
run of whitespace made one space, or None where the language has
none.
Trait Implementations§
impl Eq for Texts
impl StructuralPartialEq for Texts
Auto Trait Implementations§
impl Forget for Texts
impl Freeze for Texts
impl Move for Texts
impl RefUnwindSafe for Texts
impl Send for Texts
impl Sync for Texts
impl Unpin for Texts
impl UnsafeUnpin for Texts
impl UnwindSafe for Texts
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.