Struct tengwar::characters::tehta::Tehta
source · pub struct Tehta {
pub base: char,
pub alternate: Option<char>,
pub can_double: bool,
}
Expand description
A diacritical vowel marker that may be rendered in an alternate “long” form.
Fields§
§base: char
The primary form taken by this tehta.
alternate: Option<char>
A secondary form that may be used to represent a long vowel.
can_double: bool
Indicates whether the primary form may be printed twice.
Implementations§
source§impl Tehta
impl Tehta
sourcepub const fn single(base: char) -> Self
pub const fn single(base: char) -> Self
Define a tehta with only one shape. To lengthen it will require the extended carrier.
sourcepub const fn double(base: char) -> Self
pub const fn double(base: char) -> Self
Define a tehta with one shape, which can be printed twice to indicate a lengthened vowel.
sourcepub const fn altern(base: char, alt: char) -> Self
pub const fn altern(base: char, alt: char) -> Self
Define a tehta with two shapes. A lengthened vowel may be represented by printing either the second shape once, or the first shape twice.
sourcepub const fn with_alt(self, alt: char) -> Self
pub const fn with_alt(self, alt: char) -> Self
Add a secondary form that may be used to represent a long vowel.
sourcepub const fn with_double(self) -> Self
pub const fn with_double(self) -> Self
Specify that the basic shape of this tehta may be printed twice to represent a long vowel.
Trait Implementations§
source§impl PartialEq for Tehta
impl PartialEq for Tehta
impl Copy for Tehta
impl Eq for Tehta
impl StructuralEq for Tehta
impl StructuralPartialEq for Tehta
Auto Trait Implementations§
impl RefUnwindSafe for Tehta
impl Send for Tehta
impl Sync for Tehta
impl Unpin for Tehta
impl UnwindSafe for Tehta
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more