Struct ruma_events::room::message::UnstableAmplitude
source · pub struct UnstableAmplitude(/* private fields */);
Expand description
The unstable version of the amplitude of a waveform sample.
Must be an integer between 0 and 1024.
Implementations§
source§impl UnstableAmplitude
impl UnstableAmplitude
sourcepub fn new(value: u16) -> Self
pub fn new(value: u16) -> Self
Creates a new UnstableAmplitude
with the given value.
It will saturate if it is bigger than UnstableAmplitude::MAX
.
Trait Implementations§
source§impl Clone for UnstableAmplitude
impl Clone for UnstableAmplitude
source§fn clone(&self) -> UnstableAmplitude
fn clone(&self) -> UnstableAmplitude
Returns a copy 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 UnstableAmplitude
impl Debug for UnstableAmplitude
source§impl Default for UnstableAmplitude
impl Default for UnstableAmplitude
source§fn default() -> UnstableAmplitude
fn default() -> UnstableAmplitude
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for UnstableAmplitude
impl<'de> Deserialize<'de> for UnstableAmplitude
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
source§impl From<u16> for UnstableAmplitude
impl From<u16> for UnstableAmplitude
source§impl Hash for UnstableAmplitude
impl Hash for UnstableAmplitude
source§impl Ord for UnstableAmplitude
impl Ord for UnstableAmplitude
source§fn cmp(&self, other: &UnstableAmplitude) -> Ordering
fn cmp(&self, other: &UnstableAmplitude) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for UnstableAmplitude
impl PartialEq for UnstableAmplitude
source§fn eq(&self, other: &UnstableAmplitude) -> bool
fn eq(&self, other: &UnstableAmplitude) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for UnstableAmplitude
impl PartialOrd for UnstableAmplitude
source§fn partial_cmp(&self, other: &UnstableAmplitude) -> Option<Ordering>
fn partial_cmp(&self, other: &UnstableAmplitude) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for UnstableAmplitude
impl Serialize for UnstableAmplitude
impl Copy for UnstableAmplitude
impl Eq for UnstableAmplitude
impl StructuralPartialEq for UnstableAmplitude
Auto Trait Implementations§
impl Freeze for UnstableAmplitude
impl RefUnwindSafe for UnstableAmplitude
impl Send for UnstableAmplitude
impl Sync for UnstableAmplitude
impl Unpin for UnstableAmplitude
impl UnwindSafe for UnstableAmplitude
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.