Struct lib_ruby_parser::nodes::Pair
source · #[repr(C)]pub struct Pair {
pub key: Box<Node>,
pub value: Box<Node>,
pub operator_l: Loc,
pub expression_l: Loc,
}
Expand description
Represents a key/value pair (e.g. a part of the Hash
node)
Fields§
§key: Box<Node>
Key of the pair
value: Box<Node>
Value of the pair
operator_l: Loc
Location of the :
or =>
operator
{ foo: bar }
~
{ :foo => bar }
~~
expression_l: Loc
Location of the full expression
{ foo: bar }
~~~~~~~~
{ :foo => bar }
~~~~~~~~~~~
Trait Implementations§
source§impl PartialEq for Pair
impl PartialEq for Pair
impl StructuralPartialEq for Pair
Auto Trait Implementations§
impl Freeze for Pair
impl RefUnwindSafe for Pair
impl Send for Pair
impl Sync for Pair
impl Unpin for Pair
impl UnwindSafe for Pair
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