pub struct LiveSpec {
pub snapshot: String,
pub params: Value,
pub changes: Option<String>,
pub changes_params: Value,
pub key: String,
pub on: BTreeMap<String, FoldRule>,
}Expand description
A live declaration with its params evaluated: what a subscription is
keyed by (snapshot, params, changes, changes params) and how it folds.
Fields§
§snapshot: String§params: Value§changes: Option<String>UI-10: none — a one-shot read, no watch opened.
changes_params: Value§key: String§on: BTreeMap<String, FoldRule>Implementations§
Source§impl LiveSpec
impl LiveSpec
Sourcepub fn new(
snapshot: &str,
params: Value,
changes: Option<&str>,
changes_params: Value,
key: &str,
on: &[(&str, &str)],
) -> Result<Self, String>
pub fn new( snapshot: &str, params: Value, changes: Option<&str>, changes_params: Value, key: &str, on: &[(&str, &str)], ) -> Result<Self, String>
From its parts; an on rule that is no upsert:/remove: is refused.
Sourcepub fn from_value(v: &Value) -> Result<Self, String>
pub fn from_value(v: &Value) -> Result<Self, String>
FRAME-12: a spec as a module writes it — { snapshot, params?, changes?, changes_params?, key, on? }; params and
changes_params left out are {} (and share with a spec that says
so); a field it does not know, or a fold that is none, is refused,
naming it.
Trait Implementations§
impl StructuralPartialEq for LiveSpec
Auto Trait Implementations§
impl Forget for LiveSpec
impl Freeze for LiveSpec
impl Move for LiveSpec
impl RefUnwindSafe for LiveSpec
impl Send for LiveSpec
impl Sync for LiveSpec
impl Unpin for LiveSpec
impl UnsafeUnpin for LiveSpec
impl UnwindSafe for LiveSpec
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>.