pub struct NightModeSynchronousProxy { /* private fields */ }
Implementations§
source§impl NightModeSynchronousProxy
impl NightModeSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<NightModeEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<NightModeEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn watch(&self, ___deadline: Time) -> Result<NightModeSettings, Error>
pub fn watch(&self, ___deadline: Time) -> Result<NightModeSettings, Error>
Gets the current NightModeSettings
. Returns immediately on first
call; subsequent calls return when the values change.
If this call fails, it is considered a fatal error and the channel will be closed.
sourcepub fn set(
&self,
settings: NightModeSettings,
___deadline: Time
) -> Result<NightModeSetResult, Error>
pub fn set( &self, settings: NightModeSettings, ___deadline: Time ) -> Result<NightModeSetResult, Error>
Sets NightModeSettings
settings. Any field not explicitly set in
the table performs a no-op, and will not make any changes.