utf8proc_option_t

Struct utf8proc_option_t 

Source
#[repr(transparent)]
pub struct utf8proc_option_t(pub c_uint);
Expand description

Option flags used by several functions in the library.

Tuple Fields§

§0: c_uint

Implementations§

Source§

impl utf8proc_option_t

Source

pub const UTF8PROC_NULLTERM: utf8proc_option_t

The given UTF-8 input is NULL terminated.

Source

pub const UTF8PROC_STABLE: utf8proc_option_t

Unicode Versioning Stability has to be respected.

Source

pub const UTF8PROC_COMPAT: utf8proc_option_t

Compatibility decomposition (i.e. formatting information is lost).

Source

pub const UTF8PROC_COMPOSE: utf8proc_option_t

Return a result with decomposed characters.

Source

pub const UTF8PROC_DECOMPOSE: utf8proc_option_t

Return a result with decomposed characters.

Source

pub const UTF8PROC_IGNORE: utf8proc_option_t

Strip “default ignorable characters” such as SOFT-HYPHEN or ZERO-WIDTH-SPACE.

Source

pub const UTF8PROC_REJECTNA: utf8proc_option_t

Return an error, if the input contains unassigned codepoints.

Source

pub const UTF8PROC_NLF2LS: utf8proc_option_t

Indicating that NLF-sequences (LF, CRLF, CR, NEL) are representing a line break, and should be converted to the codepoint for line separation (LS).

Source

pub const UTF8PROC_NLF2PS: utf8proc_option_t

Indicating that NLF-sequences are representing a paragraph break, and should be converted to the codepoint for paragraph separation (PS).

Source

pub const UTF8PROC_NLF2LF: utf8proc_option_t

Indicating that the meaning of NLF-sequences is unknown.

Source

pub const UTF8PROC_STRIPCC: utf8proc_option_t

Strips and/or convers control characters.

NLF-sequences are transformed into space, except if one of the NLF2LS/PS/LF options is given. HorizontalTab (HT) and FormFeed (FF) are treated as a NLF-sequence in this case. All other control characters are simply removed.

Source

pub const UTF8PROC_CASEFOLD: utf8proc_option_t

Performs unicode case folding, to be able to do a case-insensitive string comparison.

Source

pub const UTF8PROC_CHARBOUND: utf8proc_option_t

Inserts 0xFF bytes at the beginning of each sequence which is representing a single grapheme cluster (see UAX#29).

Source

pub const UTF8PROC_LUMP: utf8proc_option_t

Lumps certain characters together.

E.g. HYPHEN U+2010 and MINUS U+2212 to ASCII “-”. See lump.md for details.

If NLF2LF is set, this includes a transformation of paragraph and line separators to ASCII line-feed (LF).

Source

pub const UTF8PROC_STRIPMARK: utf8proc_option_t

Strips all character markings.

This includes non-spacing, spacing and enclosing (i.e. accents). @note This option works only with @ref UTF8PROC_COMPOSE or @ref UTF8PROC_DECOMPOSE

Source

pub const UTF8PROC_STRIPNA: utf8proc_option_t

Strip unassigned codepoints.

Source§

impl utf8proc_option_t

Source

pub const NONE: utf8proc_option_t

Indicates no options are set.

Trait Implementations§

Source§

impl BitAnd for utf8proc_option_t

Source§

type Output = utf8proc_option_t

The resulting type after applying the & operator.
Source§

fn bitand(self, other: Self) -> Self

Performs the & operation. Read more
Source§

impl BitAndAssign for utf8proc_option_t

Source§

fn bitand_assign(&mut self, rhs: utf8proc_option_t)

Performs the &= operation. Read more
Source§

impl BitOr for utf8proc_option_t

Source§

type Output = utf8proc_option_t

The resulting type after applying the | operator.
Source§

fn bitor(self, other: Self) -> Self

Performs the | operation. Read more
Source§

impl BitOrAssign for utf8proc_option_t

Source§

fn bitor_assign(&mut self, rhs: utf8proc_option_t)

Performs the |= operation. Read more
Source§

impl Clone for utf8proc_option_t

Source§

fn clone(&self) -> utf8proc_option_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for utf8proc_option_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for utf8proc_option_t

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for utf8proc_option_t

Source§

fn eq(&self, other: &utf8proc_option_t) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for utf8proc_option_t

Source§

impl Eq for utf8proc_option_t

Source§

impl StructuralPartialEq for utf8proc_option_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.