Enum xlang_syntax::ast::MapPair
source · [−]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
sourceimpl<'input> PartialEq<MapPair<'input>> for MapPair<'input>
impl<'input> PartialEq<MapPair<'input>> for MapPair<'input>
impl<'input> StructuralPartialEq for MapPair<'input>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more