Struct starlark::debug::VariablePath
source · pub struct VariablePath { /* private fields */ }
Expand description
Represents a variable’s “access path” for a local variable or watch expression.
§Examples
- For path
var1.field1[0]
, the scope isLocal("var1")
and the access path is["field1", 0]
. - For path
someObject.method().something
, the scope isExpr("someObject.method().something")
. The access path includes segments inside the evaluated result ofsomeObject.method().something
if it returns a complex object.
Implementations§
source§impl VariablePath
impl VariablePath
sourcepub fn new_expression(expr: impl Into<String>) -> VariablePath
pub fn new_expression(expr: impl Into<String>) -> VariablePath
creates new instance of VariablePath from a given expression
sourcepub fn new_local(scope: impl Into<String>) -> VariablePath
pub fn new_local(scope: impl Into<String>) -> VariablePath
creates new instance of VariablePath from a given local variable
sourcepub fn make_child(&self, path: PathSegment) -> VariablePath
pub fn make_child(&self, path: PathSegment) -> VariablePath
creates a child segment of given access path
Trait Implementations§
source§impl Clone for VariablePath
impl Clone for VariablePath
source§fn clone(&self) -> VariablePath
fn clone(&self) -> VariablePath
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for VariablePath
impl Send for VariablePath
impl Sync for VariablePath
impl Unpin for VariablePath
impl UnwindSafe for VariablePath
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