pub enum UtfIndexClamp {
Down,
Up,
}Expand description
Clamp strategy when converting an offset that may land inside a multi-unit character.
Variants§
Down
Clamp down to the previous valid boundary (floor).
Up
Clamp up to the next valid boundary (ceil).
Trait Implementations§
Source§impl Clone for UtfIndexClamp
impl Clone for UtfIndexClamp
Source§fn clone(&self) -> UtfIndexClamp
fn clone(&self) -> UtfIndexClamp
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UtfIndexClamp
impl Debug for UtfIndexClamp
Source§impl PartialEq for UtfIndexClamp
impl PartialEq for UtfIndexClamp
impl Copy for UtfIndexClamp
impl Eq for UtfIndexClamp
impl StructuralPartialEq for UtfIndexClamp
Auto Trait Implementations§
impl Freeze for UtfIndexClamp
impl RefUnwindSafe for UtfIndexClamp
impl Send for UtfIndexClamp
impl Sync for UtfIndexClamp
impl Unpin for UtfIndexClamp
impl UnsafeUnpin for UtfIndexClamp
impl UnwindSafe for UtfIndexClamp
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