Struct ruma_common::events::audio::Waveform
source · pub struct Waveform(_);Available on crate features
events and unstable-msc3246 only.Expand description
The waveform representation of audio content.
Must include between 30 and 120 Amplitudes.
To build this, use the TryFrom implementations.
Implementations§
source§impl Waveform
impl Waveform
sourcepub const MIN_LENGTH: usize = 30usize
pub const MIN_LENGTH: usize = 30usize
The smallest number of values contained in a Waveform.
sourcepub const MAX_LENGTH: usize = 120usize
pub const MAX_LENGTH: usize = 120usize
The largest number of values contained in a Waveform.
sourcepub fn amplitudes(&self) -> &[Amplitude]
pub fn amplitudes(&self) -> &[Amplitude]
The amplitudes of this Waveform.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Waveform
impl<'de> Deserialize<'de> for Waveform
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more