#[non_exhaustive]pub struct TextAt<'a> {
pub lang: Option<&'a LangCode>,
pub part: TextPart,
pub key: &'a str,
pub file: &'a str,
/* private fields */
}Expand description
Where a text of Lang::texts is from.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.lang: Option<&'a LangCode>The language: None for the source, else the pack’s tag.
part: TextPartThe part of the language.
key: &'a strIts key: a screen or data text’s key, a line id or caption key, and
name for a TextPart::LangName.
file: &'a strFor a dialogue line, the stem of its source line’s .dlg file
(SourceLine::file); empty otherwise,
and for a pack’s line the source no longer has.
Implementations§
Source§impl TextAt<'_>
impl TextAt<'_>
Sourcepub fn path(&self) -> String
pub fn path(&self) -> String
The file the text is from, as messages name it. A pack’s is its file
under the languages’ directory, as from_files
reads it: ru/lang.ron for its name, ru/ui.ron, ru/data.ron,
and for a line ru/dialogue/ and its English line’s .dlg stem
(ru/dialogue/ch01.ron; just ru/dialogue/ for a line the source
no longer has). The source’s is a line’s .dlg file (ch01.dlg),
and its folder for the rest (en, or the tag of the source the game
declares): a Lang doesn’t keep which file the game read them
from.