#[diplomat::bridge] #[diplomat::abi_rename = "icu4x_{0}_mv1"] pubmod ffi { use alloc::boxed::Box; use core::ops::RangeInclusive;
/// Result of a single iteration of [`CodePointRangeIterator`]. /// Logically can be considered to be an `Option<RangeInclusive<DiplomatChar>>`, /// /// `start` and `end` represent an inclusive range of code points `[start, end]`, /// and `done` will be true if the iterator has already finished. The last contentful /// iteration will NOT produce a range `done=true`, in other words `start` and `end` are useful /// values if and only if `done=false`. #[diplomat::out] pubstruct CodePointRangeIteratorResult { pub start: DiplomatChar, pub end: DiplomatChar, pub done: bool,
}
/// An iterator over code point ranges, produced by `CodePointSetData` or /// one of the `CodePointMapData` types #[diplomat::opaque] pubstruct CodePointRangeIterator<'a>( pubBox<dyn Iterator<Item = RangeInclusive<DiplomatChar>> + 'a>,
);
impl<'a> CodePointRangeIterator<'a> { /// Advance the iterator by one and return the next range. /// /// If the iterator is out of items, `done` will be true pubfn next(&mutself) -> CodePointRangeIteratorResult { self.0
.next()
.map(|r| CodePointRangeIteratorResult {
start: *r.start(),
end: *r.end(),
done: false,
})
.unwrap_or(CodePointRangeIteratorResult {
start: 0,
end: 0,
done: true,
})
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.23 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.