[][src]Struct ucd_parse::UnicodeDataDecomposition

pub struct UnicodeDataDecomposition {
    pub tag: Option<UnicodeDataDecompositionTag>,
    pub len: usize,
    pub mapping: [Codepoint; 18],
}

Represents a decomposition mapping of a single row in the UnicodeData.txt file.

Fields

tag: Option<UnicodeDataDecompositionTag>

The formatting tag associated with this mapping, if present.

len: usize

The number of codepoints in this mapping.

mapping: [Codepoint; 18]

The codepoints in the mapping. Entries beyond len in the mapping are always U+0000. If no mapping was present, then this always contains a single codepoint corresponding to this row's character.

Methods

impl UnicodeDataDecomposition
[src]

pub fn new(
    tag: Option<UnicodeDataDecompositionTag>,
    mapping: &[Codepoint]
) -> Result<UnicodeDataDecomposition, Error>
[src]

Create a new decomposition mapping with the given tag and codepoints.

If there are too many codepoints, then an error is returned.

pub fn push(&mut self, cp: Codepoint) -> Result<(), Error>
[src]

Add a new codepoint to this decomposition's mapping.

If the mapping is already full, then this returns an error.

pub fn mapping(&self) -> &[Codepoint]
[src]

Return the mapping as a slice of codepoints. The slice returned has length equivalent to the number of codepoints in this mapping.

pub fn is_canonical(&self) -> bool
[src]

Returns true if and only if this decomposition mapping is canonical.

Trait Implementations

impl PartialEq<UnicodeDataDecomposition> for UnicodeDataDecomposition
[src]

impl Eq for UnicodeDataDecomposition
[src]

impl Clone for UnicodeDataDecomposition
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for UnicodeDataDecomposition
[src]

impl Display for UnicodeDataDecomposition
[src]

impl Debug for UnicodeDataDecomposition
[src]

impl FromStr for UnicodeDataDecomposition
[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]