Skip to main content

Property

Trait Property 

Source
pub trait Property:
    Clone
    + Send
    + Sync
    + PartialEq
    + 'static {
    const KEY: &'static str;
}
Expand description

Marker trait for properties that can be stored and watched

Properties must be:

  • Clone: For copying values to watchers
  • Send + Sync: For thread-safe access
  • PartialEq: For change detection (only emit when value actually changes)
  • ’static: For type-erased storage using TypeId

The KEY constant provides a human-readable identifier for debugging, logging, and event filtering.

Required Associated Constants§

Source

const KEY: &'static str

Unique key identifying this property type

Used for debugging, logging, and filtering change events. Should be unique within your application domain.

§Examples
  • "volume" for audio volume
  • "temperature" for sensor readings
  • "connection_state" for network status

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Property for Bass

Source§

const KEY: &'static str = "bass"

Source§

impl Property for CurrentTrack

Source§

const KEY: &'static str = "current_track"

Source§

impl Property for GroupMembership

Source§

const KEY: &'static str = "group_membership"

Source§

impl Property for GroupMute

Source§

const KEY: &'static str = "group_mute"

Source§

impl Property for GroupVolume

Source§

const KEY: &'static str = "group_volume"

Source§

impl Property for GroupVolumeChangeable

Source§

const KEY: &'static str = "group_volume_changeable"

Source§

impl Property for Loudness

Source§

const KEY: &'static str = "loudness"

Source§

impl Property for Mute

Source§

const KEY: &'static str = "mute"

Source§

impl Property for PlaybackState

Source§

const KEY: &'static str = "playback_state"

Source§

impl Property for Position

Source§

const KEY: &'static str = "position"

Source§

impl Property for Topology

Source§

const KEY: &'static str = "topology"

Source§

impl Property for Treble

Source§

const KEY: &'static str = "treble"

Source§

impl Property for Volume

Source§

const KEY: &'static str = "volume"