Struct tengwar::characters::tema::Tema

source ·
pub struct Tema {
    pub left: bool,
    pub open: bool,
    pub single_dn: char,
    pub double_dn: char,
    pub single_up: char,
    pub double_up: char,
    pub double_sh: char,
    pub single_sh: char,
    pub single_ex: char,
    pub double_ex: char,
}
Expand description

The Témar are the four series of the regular tengwar. Each Téma is composed of eight Tyeller, each modifying the tengwa in a different way, and is named after its base tengwa.

Only the first six Tyeller are used in Quenya.

Fields§

§left: bool

Whether the bows of these characters face left.

§open: bool

Whether the bows of these characters are open.

§single_dn: char

A descending stem with one bow.

§double_dn: char

A descending stem with two bows.

§single_up: char

An ascending stem with one bow.

§double_up: char

An ascending stem with two bows.

§double_sh: char

A short stem with two bows.

§single_sh: char

A short stem with one bow.

§single_ex: char

An extended stem with one bow.

§double_ex: char

An extended stem with two bows.

Implementations§

source§

impl Tema

source

pub const TINCO: Self = TEMA_TINCO

source

pub const PARMA: Self = TEMA_PARMA

source

pub const CALMA: Self = TEMA_CALMA

source

pub const QESSE: Self = TEMA_QESSE

source§

impl Tema

source

pub const fn contains(&self, c: char) -> bool

Determine whether a char is part of this Téma.

source

pub const fn new_tengwa(&self) -> TengwaRegular<'_>

Return the TengwaRegular in this Téma with the default Tyelle.

source

pub const fn get_tengwa(&self, tyelle: Tyelle) -> TengwaRegular<'_>

Return the TengwaRegular in this Téma at a specified Tyelle.

source

pub const fn get_char(&self, tyelle: Tyelle) -> &char

Return the char in this Téma at a specified Tyelle.

source

pub const fn find_tyelle(&self, c: char) -> Option<Tyelle>

Find the Tyelle of a given char in this Téma.

Trait Implementations§

source§

impl Clone for Tema

source§

fn clone(&self) -> Tema

Returns a copy 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 Tema

source§

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

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

impl Index<Tyelle> for Tema

§

type Output = char

The returned type after indexing.
source§

fn index(&self, tyelle: Tyelle) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Copy for Tema

Auto Trait Implementations§

§

impl RefUnwindSafe for Tema

§

impl Send for Tema

§

impl Sync for Tema

§

impl Unpin for Tema

§

impl UnwindSafe for Tema

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.