#[non_exhaustive]pub enum DeduplicationStrategy {
Maximal,
RetainBaseLanguages,
None,
}
Expand description
Choices for determining the deduplication of locales for exported data payloads.
Deduplication affects the lookup table from locales to data payloads. If a child locale points to the same payload as its parent locale, then the child locale can be removed from the lookup table. Therefore, all deduplication strategies guarantee that data requests for selected locales will succeed so long as fallback is enabled at runtime (either internally or externally). They also do not impact which payloads are included: only the lookup table.
Comparison of the deduplication strategies:
Name | Data file size | Supported locale queries? | Needs runtime fallback? |
---|---|---|---|
Maximal | Smallest | No | Yes |
RetainBaseLanguages | Small | Yes | Yes |
None | Medium/Small | Yes | No |
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Maximal
Removes from the lookup table any locale whose parent maps to the same data.
RetainBaseLanguages
Removes from the lookup table any locale whose parent maps to the same data, except if
the parent is und
.
None
Keeps all selected locales in the lookup table.
Trait Implementations§
source§impl Clone for DeduplicationStrategy
impl Clone for DeduplicationStrategy
source§fn clone(&self) -> DeduplicationStrategy
fn clone(&self) -> DeduplicationStrategy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DeduplicationStrategy
impl Debug for DeduplicationStrategy
source§impl From<DeduplicationStrategy> for FallbackOptions
impl From<DeduplicationStrategy> for FallbackOptions
source§fn from(deduplication_strategy: DeduplicationStrategy) -> Self
fn from(deduplication_strategy: DeduplicationStrategy) -> Self
source§impl Hash for DeduplicationStrategy
impl Hash for DeduplicationStrategy
source§impl PartialEq for DeduplicationStrategy
impl PartialEq for DeduplicationStrategy
impl Copy for DeduplicationStrategy
impl Eq for DeduplicationStrategy
impl StructuralPartialEq for DeduplicationStrategy
Auto Trait Implementations§
impl Freeze for DeduplicationStrategy
impl RefUnwindSafe for DeduplicationStrategy
impl Send for DeduplicationStrategy
impl Sync for DeduplicationStrategy
impl Unpin for DeduplicationStrategy
impl UnwindSafe for DeduplicationStrategy
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more