pub struct ParseOptions { /* private fields */ }
Expand description
Implementations§
Source§impl ParseOptions
impl ParseOptions
Sourcepub fn parse<R: Read>(self, reader: R) -> Result<Catalog, Error>
pub fn parse<R: Read>(self, reader: R) -> Result<Catalog, Error>
Tries to parse the catalog from the given reader using the specified options.
Sourcepub fn force_encoding(self, encoding: EncodingRef) -> Self
pub fn force_encoding(self, encoding: EncodingRef) -> Self
Forces a use of a specific encoding when parsing strings from a catalog. If this option is not enabled, the parser tries to use the encoding specified in the metadata or UTF-8 if metadata is non-existent.
Sourcepub fn force_plural(self, plural: fn(u64) -> usize) -> Self
pub fn force_plural(self, plural: fn(u64) -> usize) -> Self
Forces a use of the given plural formula
for deciding the proper plural form for a message.
If this option is not enabled,
the parser tries to use the plural formula specified in the metadata
or n != 1
if metadata is non-existent.
Trait Implementations§
Source§impl Default for ParseOptions
impl Default for ParseOptions
Source§fn default() -> ParseOptions
fn default() -> ParseOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParseOptions
impl !RefUnwindSafe for ParseOptions
impl Send for ParseOptions
impl Sync for ParseOptions
impl Unpin for ParseOptions
impl !UnwindSafe for ParseOptions
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