pub struct GroupPropertyHandle<P: SonosProperty> { /* private fields */ }Expand description
Generic property handle for group-scoped properties
Provides the same get/fetch/watch/unwatch pattern as PropertyHandle,
but reads from the group property store and executes API calls against
the group’s coordinator.
Implementations§
Source§impl<P: SonosProperty> GroupPropertyHandle<P>
impl<P: SonosProperty> GroupPropertyHandle<P>
Sourcepub fn new(context: Arc<GroupContext>) -> Self
pub fn new(context: Arc<GroupContext>) -> Self
Create a new GroupPropertyHandle from a shared GroupContext
Sourcepub fn get(&self) -> Option<P>
pub fn get(&self) -> Option<P>
Get cached group property value (sync, instant, no network call)
Sourcepub fn watch(&self) -> Result<WatchStatus<P>, SdkError>
pub fn watch(&self) -> Result<WatchStatus<P>, SdkError>
Start watching this group property for changes (sync)
Registers using the coordinator’s speaker ID so the event worker
correctly routes events through to system.iter().
Sourcepub fn is_watched(&self) -> bool
pub fn is_watched(&self) -> bool
Check if this group property is currently being watched
Source§impl<P: GroupFetchable> GroupPropertyHandle<P>
impl<P: GroupFetchable> GroupPropertyHandle<P>
Trait Implementations§
Source§impl<P: Clone + SonosProperty> Clone for GroupPropertyHandle<P>
impl<P: Clone + SonosProperty> Clone for GroupPropertyHandle<P>
Source§fn clone(&self) -> GroupPropertyHandle<P>
fn clone(&self) -> GroupPropertyHandle<P>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<P> Freeze for GroupPropertyHandle<P>
impl<P> !RefUnwindSafe for GroupPropertyHandle<P>
impl<P> Send for GroupPropertyHandle<P>
impl<P> Sync for GroupPropertyHandle<P>
impl<P> Unpin for GroupPropertyHandle<P>where
P: Unpin,
impl<P> UnsafeUnpin for GroupPropertyHandle<P>
impl<P> !UnwindSafe for GroupPropertyHandle<P>
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