Struct swash::text::cluster::CharCluster[][src]

pub struct CharCluster { /* fields omitted */ }

Character cluster; output from the parser and input to the shaper.

Implementations

impl CharCluster[src]

pub fn new() -> Self[src]

Creates a new empty cluster.

pub fn info(&self) -> ClusterInfo[src]

Returns the cluster information.

pub fn user_data(&self) -> UserData[src]

Returns the primary user data for the cluster.

pub fn range(&self) -> SourceRange[src]

Returns the source range for the cluster in code units.

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

Returns true if the cluster is empty.

pub fn chars(&self) -> &[Char]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns the sequence of characters in the cluster.

pub fn mapped_chars(&self) -> &[Char]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns the currently mapped sequence of characters in the cluster.

pub fn map(&mut self, f: impl Fn(char) -> GlyphId) -> Status[src]

Applies a nominal glyph identifier mapping to the cluster, returning a result indicating the status of the mapping.

pub fn clear(&mut self)[src]

Resets the cluster to the intial empty state.

Trait Implementations

impl Clone for CharCluster[src]

impl Copy for CharCluster[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.