Element

Enum Element 

Source
#[non_exhaustive]
pub enum Element<'s> {
Show 13 variants Text(Text<'s>), Audio(Audio<'s>), Voice(Voice<'s>), Meta(Meta<'s>), Break(Break), Emphasis(Emphasis<'s>), Mark(Mark<'s>), SayAs(SayAs<'s>), Group(Group<'s>), Lang(Lang<'s>), Prosody(Prosody<'s>), FlavorMSTTS(Element<'s>), Custom(CustomElement<'s>),
}
Expand description

Represents all SSML elements.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Text(Text<'s>)

§

Audio(Audio<'s>)

§

Voice(Voice<'s>)

§

Meta(Meta<'s>)

§

Break(Break)

§

Emphasis(Emphasis<'s>)

§

Mark(Mark<'s>)

§

SayAs(SayAs<'s>)

§

Group(Group<'s>)

§

Lang(Lang<'s>)

§

Prosody(Prosody<'s>)

§

FlavorMSTTS(Element<'s>)

§

Custom(CustomElement<'s>)

Implementations§

Source§

impl<'s> Element<'s>

Source

pub fn to_owned(&self) -> Element<'static>

Source

pub fn into_owned(self) -> Element<'static>

Trait Implementations§

Source§

impl<'s> Clone for Element<'s>

Source§

fn clone(&self) -> Element<'s>

Returns a duplicate 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<'s> Debug for Element<'s>

Source§

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

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

impl<'s> From<Audio<'s>> for Element<'s>

Source§

fn from(val: Audio<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<Break> for Element<'s>

Source§

fn from(val: Break) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<CustomElement<'s>> for Element<'s>

Source§

fn from(val: CustomElement<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<Element<'s>> for Element<'s>

Source§

fn from(val: Element<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<Emphasis<'s>> for Element<'s>

Source§

fn from(val: Emphasis<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<Express<'s>> for Element<'s>

Source§

fn from(value: Express<'s>) -> Self

Converts to this type from the input type.
Source§

impl<'s> From<Group<'s>> for Element<'s>

Source§

fn from(val: Group<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<Lang<'s>> for Element<'s>

Source§

fn from(val: Lang<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<Mark<'s>> for Element<'s>

Source§

fn from(val: Mark<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<Meta<'s>> for Element<'s>

Source§

fn from(val: Meta<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<Prosody<'s>> for Element<'s>

Source§

fn from(val: Prosody<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<SayAs<'s>> for Element<'s>

Source§

fn from(val: SayAs<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s, T: Into<Cow<'s, str>>> From<T> for Element<'s>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl<'s> From<Text<'s>> for Element<'s>

Source§

fn from(val: Text<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> From<Voice<'s>> for Element<'s>

Source§

fn from(val: Voice<'s>) -> Element<'s>

Converts to this type from the input type.
Source§

impl<'s> Serialize for Element<'s>

Source§

fn serialize_xml<W: Write>( &self, writer: &mut XmlWriter<W>, options: &SerializeOptions, ) -> Result<()>

Serialize this SSML element into an XmlWriter.
Source§

fn serialize<W: Write>( &self, writer: &mut W, options: &SerializeOptions, ) -> Result<()>

Serialize this SSML element into an std Writer.
Source§

fn serialize_to_string(&self, options: &SerializeOptions) -> Result<String>

Serialize this SSML element into a string.

Auto Trait Implementations§

§

impl<'s> Freeze for Element<'s>

§

impl<'s> RefUnwindSafe for Element<'s>

§

impl<'s> Send for Element<'s>

§

impl<'s> Sync for Element<'s>

§

impl<'s> Unpin for Element<'s>

§

impl<'s> UnwindSafe for Element<'s>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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<'s, T> IntoElement<'s> for T
where T: Into<Element<'s>>,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.