pub struct ReplacementArray { /* private fields */ }
Expand description
An array of rule Replacement
s (text, xpath, tts commands, etc)
Implementations§
Source§impl ReplacementArray
impl 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: &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: &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: &mut SpeechRulesWithContext<'c, 's, 'm>, mathml: Element<'c>, ) -> Result<String>
pub fn replace_array_tree<'c, 's: 'c, 'm: 'c>( &self, rules_with_context: &mut SpeechRulesWithContext<'c, 's, 'm>, mathml: Element<'c>, ) -> Result<Element<'m>>
Trait Implementations§
Source§impl Clone for ReplacementArray
impl Clone for ReplacementArray
Source§fn clone(&self) -> ReplacementArray
fn clone(&self) -> ReplacementArray
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ReplacementArray
impl Debug for ReplacementArray
Auto Trait Implementations§
impl Freeze for ReplacementArray
impl !RefUnwindSafe for ReplacementArray
impl !Send for ReplacementArray
impl !Sync for ReplacementArray
impl Unpin for ReplacementArray
impl !UnwindSafe for ReplacementArray
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