[−][src]Struct lib_ruby_parser::nodes::Casgn
Represents a constant assignment (i.e. A = 1
)
Fields
scope: Option<Box<Node>>
Scope where the constant is defined:
1. Some(Const("A"))
for A::B = 1
2. None
if it's defined in the current scope (i.e. A = 1
)
3. Some(Cbase)
if it's defined in the global scope (i.e. ::A = 1
)
name: String
Name of the constant, String("A")
for A = 1
value: Option<Box<Node>>
Value that is assigned to a constant, Int("1")
for A = 1
.
Note: None
if constant assignment is a part of the multi-assignment.
In such case value
belongs to Masgn
node of the multi-assignment.
double_colon_l: Option<Range>
Location of the ::
operator
A::B = 1
~~
::A = 1
~~
None
if the constant is defined in the current scope
name_l: Range
Location of the constant name
A::CONST = 1
~~~~~
operator_l: Option<Range>
Location of the =
operator
A = 1
~
None
if constant assignment is a part of the multi-assignment.
In such case =
belongs to a Masgn
node
expression_l: Range
Location of the full expression
A = 1
~~~~~
Trait Implementations
impl Clone for Casgn
[src]
impl Debug for Casgn
[src]
impl PartialEq<Casgn> for Casgn
[src]
impl StructuralPartialEq for Casgn
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Casgn
impl !Send for Casgn
impl !Sync for Casgn
impl Unpin for Casgn
impl UnwindSafe for Casgn
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,