Struct lib_ruby_parser::nodes::SClass
source · [−]#[repr(C)]pub struct SClass {
pub expr: Box<Node>,
pub body: Option<Box<Node>>,
pub keyword_l: Loc,
pub operator_l: Loc,
pub end_l: Loc,
pub expression_l: Loc,
}
Expand description
Represents opening a singleton class (i.e. class << foo; ... end;
)
Fields
expr: Box<Node>
Expression that is used to get a singleton class
Lvar("foo")
for class << foo; end
body: Option<Box<Node>>
Body of the block
keyword_l: Loc
Location of the class
keyword
class << foo; end
~~~~~
operator_l: Loc
Location of the <<
operator
class << foo; end
~~
end_l: Loc
Location of the end
keyword
class << foo; end
~~~
expression_l: Loc
Location of the full expression
class << foo; end
~~~~~~~~~~~~~~~~~
Trait Implementations
impl StructuralPartialEq for SClass
Auto Trait Implementations
impl RefUnwindSafe for SClass
impl Send for SClass
impl Sync for SClass
impl Unpin for SClass
impl UnwindSafe for SClass
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