pub enum ObjField {
Kv {
key: String,
val: Expr,
optional: bool,
cond: Option<Expr>,
},
Short(String),
Dynamic {
key: Expr,
val: Expr,
},
Spread(Expr),
SpreadDeep(Expr),
}Variants§
Kv
key: expr (optionally key: expr when cond)
Short(String)
key — shorthand for key: key
Dynamic
[expr]: expr — dynamic key
Spread(Expr)
...expr — spread object (shallow)
SpreadDeep(Expr)
...**expr — deep-merge spread: recurse into nested objects,
concatenate arrays, rhs wins for scalars
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ObjField
impl RefUnwindSafe for ObjField
impl Send for ObjField
impl Sync for ObjField
impl Unpin for ObjField
impl UnsafeUnpin for ObjField
impl UnwindSafe for ObjField
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