pub struct Format {
pub language: String,
pub pairs: Vec<Pair>,
}Expand description
Represents an Apple .strings localization file.
The format consists of a set of key-value pairs, with optional comments.
Fields§
§language: StringLanguage code for this resource, if known (typically empty for .strings).
pairs: Vec<Pair>All key-value pairs (and optional comments) in the file.
Implementations§
Trait Implementations§
Source§impl Parser for Format
impl Parser for Format
Source§fn from_reader<R: BufRead>(reader: R) -> Result<Self, Error>
fn from_reader<R: BufRead>(reader: R) -> Result<Self, Error>
Creates a new Format instance with the specified language and pairs.
The language parameter would be empty, since the .strings format does
not contain any metadata about the language.
Source§fn to_writer<W: Write>(&self, writer: W) -> Result<(), Error>
fn to_writer<W: Write>(&self, writer: W) -> Result<(), Error>
Write to any writer (file, memory, etc.).
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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