pub trait State {
// Required methods
fn set_state_changed_fn<F>(&self, f: Option<F>)
where F: FnMut(ChangedFlags) + 'static;
fn state_changed_stream(&self) -> StateChangedStream;
}
Expand description
State-change-related methods from the OpenThread “Instance” Module.
Required Methods§
Sourcefn set_state_changed_fn<F>(&self, f: Option<F>)where
F: FnMut(ChangedFlags) + 'static,
fn set_state_changed_fn<F>(&self, f: Option<F>)where
F: FnMut(ChangedFlags) + 'static,
Functional equivalent to
otsys::otSetStateChangedCallback
.
Sourcefn state_changed_stream(&self) -> StateChangedStream
fn state_changed_stream(&self) -> StateChangedStream
Returns an asynchronous stream for state-change events.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.