pub enum MapPair<'input> {
Local {
loc: Loc,
name: Ident<'input>,
},
Literal {
loc: Loc,
name: Ident<'input>,
value: Box<Expr<'input>>,
},
Evaluated {
loc: Loc,
name: Box<Expr<'input>>,
value: Box<Expr<'input>>,
},
}
Expand description
A key and value in a map literal.
Variants§
Local
A local variable will be used as the value.
Literal
A value has been explicitly used as the name.
Evaluated
An expression is used as the key and will be evaluated at runtime.
Implementations§
Trait Implementations§
impl<'input> StructuralPartialEq for MapPair<'input>
Auto Trait Implementations§
impl<'input> Freeze for MapPair<'input>
impl<'input> RefUnwindSafe for MapPair<'input>
impl<'input> Send for MapPair<'input>
impl<'input> Sync for MapPair<'input>
impl<'input> Unpin for MapPair<'input>
impl<'input> UnwindSafe for MapPair<'input>
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