#[non_exhaustive]pub enum PropertyChange {
Volume(Volume),
Mute(Mute),
Bass(Bass),
Treble(Treble),
Loudness(Loudness),
PlaybackState(PlaybackState),
Position(Position),
CurrentTrack(CurrentTrack),
GroupMembership(GroupMembership),
GroupVolume(GroupVolume),
GroupMute(GroupMute),
GroupVolumeChangeable(GroupVolumeChangeable),
}Expand description
A single property change
#[non_exhaustive] because this enum is public API (re-exported from
sonos-sdk) and gains a variant every time a property is added. Without it,
every consumer match would be exhaustive-by-default and adding a property
would be a breaking change; consumers must include a _ => arm.
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.
Volume(Volume)
Mute(Mute)
Bass(Bass)
Treble(Treble)
Loudness(Loudness)
PlaybackState(PlaybackState)
Position(Position)
CurrentTrack(CurrentTrack)
GroupMembership(GroupMembership)
GroupVolume(GroupVolume)
GroupMute(GroupMute)
GroupVolumeChangeable(GroupVolumeChangeable)
Implementations§
Source§impl PropertyChange
impl PropertyChange
Sourcepub fn apply(
&self,
store: &mut StateStore,
speaker_id: &SpeakerId,
stamp: WriteStamp,
) -> WriteOutcome
pub fn apply( &self, store: &mut StateStore, speaker_id: &SpeakerId, stamp: WriteStamp, ) -> WriteOutcome
Apply this change to the store using scope-based routing
Speaker-scoped properties are stored in speaker_props,
group-scoped properties resolve speaker→group and store in group_props.
Returns the WriteOutcome — Changed only if the value actually
changed and stamp was not older than the stored observation.
Trait Implementations§
Source§impl Clone for PropertyChange
impl Clone for PropertyChange
Source§fn clone(&self) -> PropertyChange
fn clone(&self) -> PropertyChange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PropertyChange
impl RefUnwindSafe for PropertyChange
impl Send for PropertyChange
impl Sync for PropertyChange
impl Unpin for PropertyChange
impl UnsafeUnpin for PropertyChange
impl UnwindSafe for PropertyChange
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