Skip to main content

Audio

Struct Audio 

Source
pub struct Audio<'t> { /* private fields */ }
Expand description

<audio>: Embed Audio element

Implementations§

Source§

impl<'t> Audio<'t>

<audio> items

Source

pub fn autoplay(&mut self) -> &mut Self

Add autoplay Boolean attribute

Source

pub fn controls(&mut self) -> &mut Self

Add controls Boolean attribute

Source

pub fn controlslist<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add controlslist attribute

Source

pub fn crossorigin<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add crossorigin attribute

Source

pub fn disableremoteplayback(&mut self) -> &mut Self

Add disableremoteplayback Boolean attribute

Source

pub fn loop(&mut self) -> &mut Self

Add loop Boolean attribute

Source

pub fn preload<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add preload attribute

Source

pub fn src<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add src attribute

Source

pub fn source(&mut self) -> Source<'_>

Add Source child element

Source

pub fn track(&mut self) -> Track<'_>

Add Track child element

Source

pub fn comment<'v, V>(&mut self, com: V) -> &mut Self
where V: Into<Value<'v>>,

Add a comment

These characters will be replaced with entities:

CharEntity
-&hyphen;
<&lt;
>&gt;
Source

pub fn raw(&mut self, trusted: impl AsRef<str>) -> &mut Self

Add raw content

WARNING: trusted is used verbatim, with no escaping; do not call with untrusted content.

Source

pub fn close(&'t mut self) -> &'t mut Tree

Close the element

  • Closes all child elements
  • Adds the closing tag if necessary (e.g. </audio>)
Source§

impl<'t> Audio<'t>

Global attributes

Source

pub fn id<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add id attribute

Source

pub fn class<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add class attribute

Source

pub fn accesskey<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add accesskey attribute

Source

pub fn autocapitalize<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add autocapitalize attribute

Source

pub fn autocorrect<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add autocorrect attribute

Source

pub fn autofocus(&mut self) -> &mut Self

Add autofocus Boolean attribute

Source

pub fn contenteditable<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add contenteditable attribute

Source

pub fn data_<'a, V>(&mut self, name: &str, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add data-* attribute

Source

pub fn dir<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add dir attribute

Source

pub fn draggable<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add draggable attribute

Source

pub fn enterkeyhint<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add enterkeyhint attribute

Source

pub fn exportparts<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add exportparts attribute

Source

pub fn hidden<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add hidden attribute

Source

pub fn inert(&mut self) -> &mut Self

Add inert Boolean attribute

Source

pub fn inputmode<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add inputmode attribute

Source

pub fn is<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add is attribute

Source

pub fn itemid<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add itemid attribute

Source

pub fn itemprop<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add itemprop attribute

Source

pub fn itemref<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add itemref attribute

Source

pub fn itemscope(&mut self) -> &mut Self

Add itemscope Boolean attribute

Source

pub fn itemtype<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add itemtype attribute

Source

pub fn lang<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add lang attribute

Source

pub fn nonce<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add nonce attribute

Source

pub fn onblur<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add onblur attribute

Source

pub fn onchange<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add onchange attribute

Source

pub fn onclick<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add onclick attribute

Source

pub fn onclose<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add onclose attribute

Source

pub fn onerror<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add onerror attribute

Source

pub fn onfocus<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add onfocus attribute

Source

pub fn part<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add part attribute

Source

pub fn popover<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add popover attribute

Source

pub fn role<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add role attribute

Source

pub fn slot<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add slot attribute

Source

pub fn spellcheck<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add spellcheck attribute

Source

pub fn style<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add style attribute

Source

pub fn tabindex<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add tabindex attribute

Source

pub fn title<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add title attribute

Source

pub fn translate<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add translate attribute

Source

pub fn aria_atomic<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-atomic attribute

Source

pub fn aria_busy<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-busy attribute

Source

pub fn aria_controls<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-controls attribute

Source

pub fn aria_current<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-current attribute

Source

pub fn aria_describedby<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-describedby attribute

Source

pub fn aria_description<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-description attribute

Source

pub fn aria_details<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-details attribute

Source

pub fn aria_disabled<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-disabled attribute

Source

pub fn aria_errormessage<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-errormessage attribute

Source

pub fn aria_flowto<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-flowto attribute

Source

pub fn aria_haspopup<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-haspopup attribute

Source

pub fn aria_hidden<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-hidden attribute

Source

pub fn aria_invalid<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-invalid attribute

Source

pub fn aria_keyshortcuts<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-keyshortcuts attribute

Source

pub fn aria_label<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-label attribute

Source

pub fn aria_labelledby<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-labelledby attribute

Source

pub fn aria_live<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-live attribute

Source

pub fn aria_owns<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-owns attribute

Source

pub fn aria_relevant<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-relevant attribute

Source

pub fn aria_roledescription<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add aria-roledescription attribute

Auto Trait Implementations§

§

impl<'t> Freeze for Audio<'t>

§

impl<'t> RefUnwindSafe for Audio<'t>

§

impl<'t> Send for Audio<'t>

§

impl<'t> Sync for Audio<'t>

§

impl<'t> Unpin for Audio<'t>

§

impl<'t> UnsafeUnpin for Audio<'t>

§

impl<'t> !UnwindSafe for Audio<'t>

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> 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<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.