pub struct Beleriand { /* private fields */ }
Expand description

The Mode of Beleriand, developed in the First Age for writing Sindarin.

Implementations§

source§

impl Beleriand

source

pub fn decide_f(next: &[char]) -> Glyph

Trait Implementations§

source§

impl Clone for Beleriand

source§

fn clone(&self) -> Beleriand

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 Beleriand

source§

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

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

impl Default for Beleriand

source§

fn default() -> Beleriand

Returns the “default value” for a type. Read more
source§

impl TengwarMode for Beleriand

source§

fn finish_current(&mut self) -> Option<Token>

If there is a Token currently under construction, return it and clear it from the internal state, preparing to begin a new one. Read more
source§

fn process(&mut self, chunk: &[char]) -> ParseAction

Process a slice of chars, and return a ParseAction indicating the new state of the conversion in progress. Read more
source§

const MAX_CHUNK: usize = 3usize

This is the maximum size for a “chunk” of chars passed to Self::process. It is also the maximum number of passes that will be attempted before skipping a char and moving on.
source§

fn transcribe<T: FromIterator<Token>>(input: impl AsRef<str>) -> Twhere Self: Default,

Set up a Transcriber over the characters of an input string, and immediately collect it into the target type.
source§

fn default_transcriber(input: impl AsRef<str>) -> Transcriber<Self>where Self: Default,

Set up a Transcriber over the characters of an input string, using the default initial state of this mode.
source§

fn into_transcriber(self, input: impl AsRef<str>) -> Transcriber<Self>where Self: Sized,

Set up a Transcriber over the characters of an input string.
source§

fn finalize(&self, token: &mut Token, next: Option<&Token>)

Perform any last-minute modifications to a Token that may be needed upon finding out what the following Token will be. By default, this method is a no-op.
source§

fn find_index(&mut self, slice: &[char]) -> Option<(char, usize)>

Try to parse a slice of characters into an “index” of a sequence. This special case of a numeral is intended for use in enumerated lists.
source§

fn find_numeral(&mut self, slice: &[char]) -> Option<(Numeral, usize)>

Try to parse a slice of characters into a Numeral. If successful, returns the Numeral alongside the number of chars that were processed in order to find it. Read more
source§

fn find_secondary(&mut self, slice: &[char]) -> Option<(Token, usize)>

Try to parse a slice of characters into a Token. If successful, returns the Token alongside the number of chars that were processed in order to produce it. Read more
source§

impl Copy for Beleriand

Auto Trait Implementations§

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.