pub struct ModuleSpec {
pub query: LiveQuery,
pub params: Value,
pub changes_params: Value,
pub when: bool,
}Expand description
FRAME-19: a module’s live spec — LiveSpec::from_value’s keys,
plus what rhx’s live has: when (a boolean, true when left out;
false holds it — nothing asked) and debounce_ms (how long its params
must be quiet before it runs again). when and debounce_ms are not
part of what is shared: two modules asking the same spec, held or not,
read one collection once both ask.
Fields§
§query: LiveQuery§params: Value§changes_params: Value§when: boolImplementations§
Source§impl ModuleSpec
impl ModuleSpec
Sourcepub fn from_value(v: &Value) -> Result<Self, String>
pub fn from_value(v: &Value) -> Result<Self, String>
From a module’s spec as it crosses the bus (JSON): { snapshot, params?, changes?, changes_params?, key, on?, when?, debounce_ms? };
a when that is no boolean, a debounce_ms that is no count, or a
key it does not know is refused, naming it.
Trait Implementations§
Source§impl Clone for ModuleSpec
impl Clone for ModuleSpec
Source§impl Debug for ModuleSpec
impl Debug for ModuleSpec
Source§impl PartialEq for ModuleSpec
impl PartialEq for ModuleSpec
impl StructuralPartialEq for ModuleSpec
Auto Trait Implementations§
impl Forget for ModuleSpec
impl Freeze for ModuleSpec
impl Move for ModuleSpec
impl RefUnwindSafe for ModuleSpec
impl Send for ModuleSpec
impl Sync for ModuleSpec
impl Unpin for ModuleSpec
impl UnsafeUnpin for ModuleSpec
impl UnwindSafe for ModuleSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Variant for T
impl<T> Variant for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert this
Variant trait object to &mut dyn Any.Source§fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
Convert this
Variant trait object to Box<dyn Any>.