pub struct StateManagerBuilder { /* private fields */ }Expand description
Builder for StateManager configuration
Implementations§
Source§impl StateManagerBuilder
impl StateManagerBuilder
Sourcepub fn cleanup_timeout(self, timeout: Duration) -> Self
pub fn cleanup_timeout(self, timeout: Duration) -> Self
Set the cleanup timeout for subscriptions
Sourcepub fn with_event_manager(self, em: Arc<SonosEventManager>) -> Self
pub fn with_event_manager(self, em: Arc<SonosEventManager>) -> Self
Set the event manager for live event processing
When an event manager is provided, the StateManager will:
- Spawn a background worker to process events
- Automatically subscribe/unsubscribe via
watch()/unwatch()on properties - Update state from incoming events
Sourcepub fn build(self) -> Result<StateManager>
pub fn build(self) -> Result<StateManager>
Build the StateManager
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StateManagerBuilder
impl !UnwindSafe for StateManagerBuilder
impl Freeze for StateManagerBuilder
impl Send for StateManagerBuilder
impl Sync for StateManagerBuilder
impl Unpin for StateManagerBuilder
impl UnsafeUnpin for StateManagerBuilder
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