pub struct Text(/* private fields */);Expand description
A wrapper around ICU’s UText struct.
In our case its only purpose is to adapt a TextBuffer for ICU.
§Safety
Warning! No lifetime tracking is done here. I initially did it properly with a PhantomData marker for the TextBuffer lifetime, but it was a pain so now I don’t. Not a big deal in our case.
Implementations§
Source§impl Text
impl Text
Sourcepub unsafe fn new(tb: &TextBuffer) -> Result<Self>
pub unsafe fn new(tb: &TextBuffer) -> Result<Self>
Constructs an ICU UText instance from a TextBuffer.
§Safety
The caller must ensure that the given TextBuffer
outlives the returned Text instance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl !Send for Text
impl !Sync for Text
impl Unpin for Text
impl !UnwindSafe for Text
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