Struct libmathcat::speech::ReplacementArray
source · [−]pub struct ReplacementArray { /* private fields */ }Expand description
An array of rule Replacements (text, xpath, tts commands, etc)
Implementations
sourceimpl<'r> ReplacementArray
impl<'r> ReplacementArray
sourcepub fn build_empty() -> ReplacementArray
pub fn build_empty() -> ReplacementArray
Return an empty ReplacementArray
sourcepub fn build(replacements: &Yaml) -> Result<ReplacementArray>
pub fn build(replacements: &Yaml) -> Result<ReplacementArray>
Convert a Yaml input into a ReplacementArray.
Any errors are passed back out.
sourcepub fn replace<'c, 's: 'c, 'm: 'c, T: TreeOrString<'c, 'm, T>>(
&self,
rules_with_context: &'r mut SpeechRulesWithContext<'c, 's, 'm>,
mathml: Element<'c>
) -> Result<T>
pub fn replace<'c, 's: 'c, 'm: 'c, T: TreeOrString<'c, 'm, T>>(
&self,
rules_with_context: &'r mut SpeechRulesWithContext<'c, 's, 'm>,
mathml: Element<'c>
) -> Result<T>
Do all the replacements in mathml using rules.
pub fn replace_array_string<'c, 's: 'c, 'm: 'c>(
&self,
rules_with_context: &'r mut SpeechRulesWithContext<'c, 's, 'm>,
mathml: Element<'c>
) -> Result<String>
pub fn replace_array_tree<'c, 's: 'c, 'm: 'c>(
&self,
rules_with_context: &'r mut SpeechRulesWithContext<'c, 's, 'm>,
mathml: Element<'c>
) -> Result<Element<'m>>
Trait Implementations
sourceimpl Clone for ReplacementArray
impl Clone for ReplacementArray
sourcefn clone(&self) -> ReplacementArray
fn clone(&self) -> ReplacementArray
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ReplacementArray
impl Debug for ReplacementArray
Auto Trait Implementations
impl !RefUnwindSafe for ReplacementArray
impl !Send for ReplacementArray
impl !Sync for ReplacementArray
impl Unpin for ReplacementArray
impl !UnwindSafe for ReplacementArray
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more