#[non_exhaustive]pub enum CatalogMode {
IcuPo,
IcuNdjson,
GettextPo,
}Expand description
Valid high-level catalog mode combinations.
This type groups the storage format, semantic model, and plural encoding choices that must be kept in sync for catalog parse, update, and combine operations. It is non-exhaustive so future supported catalog modes can be added without breaking downstream matches.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
IcuPo
Gettext PO storage with ICU-native message semantics.
IcuNdjson
NDJSON storage with ICU-native message semantics.
GettextPo
Gettext PO storage with classic gettext plural semantics.
Implementations§
Source§impl CatalogMode
impl CatalogMode
Sourcepub const fn storage_format(self) -> CatalogStorageFormat
pub const fn storage_format(self) -> CatalogStorageFormat
Returns the storage format implied by this mode.
Sourcepub const fn semantics(self) -> CatalogSemantics
pub const fn semantics(self) -> CatalogSemantics
Returns the catalog semantics implied by this mode.
Sourcepub const fn plural_encoding(self) -> PluralEncoding
pub const fn plural_encoding(self) -> PluralEncoding
Returns the plural encoding implied by this mode.
Sourcepub const fn from_parts(
storage_format: CatalogStorageFormat,
semantics: CatalogSemantics,
plural_encoding: PluralEncoding,
) -> Option<CatalogMode>
pub const fn from_parts( storage_format: CatalogStorageFormat, semantics: CatalogSemantics, plural_encoding: PluralEncoding, ) -> Option<CatalogMode>
Returns the matching catalog mode for explicit parts.
Trait Implementations§
Source§impl Clone for CatalogMode
impl Clone for CatalogMode
Source§fn clone(&self) -> CatalogMode
fn clone(&self) -> CatalogMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CatalogMode
Source§impl Debug for CatalogMode
impl Debug for CatalogMode
Source§impl Default for CatalogMode
impl Default for CatalogMode
Source§fn default() -> CatalogMode
fn default() -> CatalogMode
Returns the “default value” for a type. Read more
impl Eq for CatalogMode
Source§impl PartialEq for CatalogMode
impl PartialEq for CatalogMode
Source§fn eq(&self, other: &CatalogMode) -> bool
fn eq(&self, other: &CatalogMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CatalogMode
Auto Trait Implementations§
impl Freeze for CatalogMode
impl RefUnwindSafe for CatalogMode
impl Send for CatalogMode
impl Sync for CatalogMode
impl Unpin for CatalogMode
impl UnsafeUnpin for CatalogMode
impl UnwindSafe for CatalogMode
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