pub enum UnassignedCodepointHandling {
Forbid,
Strip,
Allow,
}
Expand description
Indicates how to handle unassigned codepoints.
Variants§
Forbid
Return an ErrorKind::NotAssigned
error if an unassigned codepoint is encountered.
This corresponds to the UTF8PROC_REJECTNA
option in the C library.
Strip
Remove unassigned codepoints.
This corresponds to the UTF8PROC_STRIPNA
option in the C library.
Allow
Allow unassigned codepoints, without returning an error or ignoring them.
This option can only be set using the advanced interface, as unsigned codepoints have the potential to produce invalid UTF8.
Trait Implementations§
Source§impl Clone for UnassignedCodepointHandling
impl Clone for UnassignedCodepointHandling
Source§fn clone(&self) -> UnassignedCodepointHandling
fn clone(&self) -> UnassignedCodepointHandling
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 UnassignedCodepointHandling
impl Debug for UnassignedCodepointHandling
Source§impl Default for UnassignedCodepointHandling
impl Default for UnassignedCodepointHandling
Source§fn default() -> UnassignedCodepointHandling
fn default() -> UnassignedCodepointHandling
Returns the “default value” for a type. Read more
Source§impl Hash for UnassignedCodepointHandling
impl Hash for UnassignedCodepointHandling
impl Copy for UnassignedCodepointHandling
impl Eq for UnassignedCodepointHandling
impl StructuralPartialEq for UnassignedCodepointHandling
Auto Trait Implementations§
impl Freeze for UnassignedCodepointHandling
impl RefUnwindSafe for UnassignedCodepointHandling
impl Send for UnassignedCodepointHandling
impl Sync for UnassignedCodepointHandling
impl Unpin for UnassignedCodepointHandling
impl UnwindSafe for UnassignedCodepointHandling
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