[−][src]Struct ucd_parse::UnicodeDataDecomposition
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]
tag: Option<UnicodeDataDecompositionTag>,
mapping: &[Codepoint]
) -> Result<UnicodeDataDecomposition, Error>
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 Clone for UnicodeDataDecomposition
[src]
fn clone(&self) -> UnicodeDataDecomposition
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for UnicodeDataDecomposition
[src]
impl Default for UnicodeDataDecomposition
[src]
fn default() -> UnicodeDataDecomposition
[src]
impl Display for UnicodeDataDecomposition
[src]
impl Eq for UnicodeDataDecomposition
[src]
impl FromStr for UnicodeDataDecomposition
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<UnicodeDataDecomposition, Error>
[src]
impl PartialEq<UnicodeDataDecomposition> for UnicodeDataDecomposition
[src]
fn eq(&self, other: &UnicodeDataDecomposition) -> bool
[src]
fn ne(&self, other: &UnicodeDataDecomposition) -> bool
[src]
impl StructuralEq for UnicodeDataDecomposition
[src]
impl StructuralPartialEq for UnicodeDataDecomposition
[src]
Auto Trait Implementations
impl RefUnwindSafe for UnicodeDataDecomposition
impl Send for UnicodeDataDecomposition
impl Sync for UnicodeDataDecomposition
impl Unpin for UnicodeDataDecomposition
impl UnwindSafe for UnicodeDataDecomposition
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,