pub enum ParsedElement {
Show 21 variants
Speak(SpeakAttributes),
Lexicon(LexiconAttributes),
Lookup(LookupAttributes),
Meta(MetaAttributes),
Metadata,
Paragraph,
Sentence,
Token(TokenAttributes),
Word(TokenAttributes),
SayAs(SayAsAttributes),
Phoneme(PhonemeAttributes),
Sub(SubAttributes),
Lang(LangAttributes),
Voice(VoiceAttributes),
Emphasis(EmphasisAttributes),
Break(BreakAttributes),
Prosody(ProsodyAttributes),
Audio(AudioAttributes),
Mark(MarkAttributes),
Description(String),
Custom((String, BTreeMap<String, String>)),
}
Expand description
Enum representing the parsed element, each element with attributes allowed also contains an object for it’s attributes.
Variants§
Speak(SpeakAttributes)
The <speak></speak>
element and given attributes.
Lexicon(LexiconAttributes)
The <lexicon/>
element and given attributes.
Lookup(LookupAttributes)
The <lookup></lookup>
element and given attributes.
Meta(MetaAttributes)
The ` element and given attributes.
Metadata
The <metadata></metadata>
element.
Paragraph
The <p></p>
element.
Sentence
The <s></s>
element.
Token(TokenAttributes)
The <token></token>
element and given attributes.
Word(TokenAttributes)
The <word></word>
element and given attributes.
SayAs(SayAsAttributes)
The <say-as></say-as>
element and given attributes.
Phoneme(PhonemeAttributes)
The <phoneme></phoneme>
element and given attributes.
Sub(SubAttributes)
The <sub></sub>
element and given attributes.
Lang(LangAttributes)
The <lang></lang>
element and given attributes.
Voice(VoiceAttributes)
The <voice></voice>
element and given attributes.
Emphasis(EmphasisAttributes)
The <emphasis></emphasis>
element and given attributes.
Break(BreakAttributes)
The <break/>
element and given attributes.
Prosody(ProsodyAttributes)
The <prosody></prosody>
element and given attributes.
Audio(AudioAttributes)
The <audio></audio>
element and given attributes.
Mark(MarkAttributes)
The <mark/>
element and given attributes.
Description(String)
The <desc></desc>
element and given attributes.
Custom((String, BTreeMap<String, String>))
Custom elements not defined in the spec, the element name is stored in the given string and any attributes in the map.
Implementations§
Source§impl ParsedElement
impl ParsedElement
Sourcepub fn attribute_string(&self) -> String
pub fn attribute_string(&self) -> String
From an element get the XML attribute string - this is used for writing the SSML back out
Returns true if an SSML element can contain tags
Sourcepub fn can_contain(&self, other: &Self) -> bool
pub fn can_contain(&self, other: &Self) -> bool
Returns true if an SSML element can contain another element
Trait Implementations§
Source§impl Clone for ParsedElement
impl Clone for ParsedElement
Source§fn clone(&self) -> ParsedElement
fn clone(&self) -> ParsedElement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more