pub enum ViewSpec {
Element {
id: Option<String>,
style: Option<Style>,
row: bool,
children: Vec<ViewSpec>,
},
Text {
id: Option<String>,
style: Option<Style>,
text: String,
},
Rows {
id: Option<String>,
style: Option<Style>,
count: usize,
first: usize,
rows: Vec<ViewSpec>,
},
}Expand description
JSON shape accepted from script runtimes. Kept separate from ViewNode so
the host owns style defaults and script cannot smuggle in a closure.
Variants§
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ViewSpec
impl<'de> Deserialize<'de> for ViewSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ViewSpec
impl RefUnwindSafe for ViewSpec
impl Send for ViewSpec
impl Sync for ViewSpec
impl Unpin for ViewSpec
impl UnsafeUnpin for ViewSpec
impl UnwindSafe for ViewSpec
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