pub struct LocaleFallbackIterator<'a, 'b> {
current: DataLocale,
inner: LocaleFallbackIteratorInner<'a>,
phantom: PhantomData<&'b ()>,
}
Expand description
Iteration type for locale fallback operations.
Because the Iterator
trait does not allow items to borrow from the iterator, this class does
not implement that trait. Instead, use .step()
and .get()
.
Fields§
§current: DataLocale
§inner: LocaleFallbackIteratorInner<'a>
§phantom: PhantomData<&'b ()>
Implementations§
source§impl LocaleFallbackIterator<'_, '_>
impl LocaleFallbackIterator<'_, '_>
sourcepub fn get(&self) -> &DataLocale
pub fn get(&self) -> &DataLocale
Borrows the current DataLocale
under fallback.
sourcepub fn take(self) -> DataLocale
pub fn take(self) -> DataLocale
Takes the current DataLocale
under fallback.
sourcepub fn step(&mut self) -> &mut Self
pub fn step(&mut self) -> &mut Self
Performs one step of the locale fallback algorithm.
The fallback is completed once the inner DataLocale
becomes und
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'b> Freeze for LocaleFallbackIterator<'a, 'b>
impl<'a, 'b> RefUnwindSafe for LocaleFallbackIterator<'a, 'b>
impl<'a, 'b> Send for LocaleFallbackIterator<'a, 'b>
impl<'a, 'b> Sync for LocaleFallbackIterator<'a, 'b>
impl<'a, 'b> Unpin for LocaleFallbackIterator<'a, 'b>
impl<'a, 'b> UnwindSafe for LocaleFallbackIterator<'a, 'b>
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