Enum starlark::debug::PathSegment
source · pub enum PathSegment {
Index(i32),
Attr(String),
Key(String),
}
Expand description
Represents a segment in an access expression.
For the given expression name.field1.array\[0\]
, the segments are “field1”, “array”, and “0”.
Variants§
Index(i32)
Represents a path segment that accesses array-like types (i.e., types indexable by numbers).
Attr(String)
Represents a path segment that accesses object-like types (i.e., types keyed by strings).
Key(String)
Represents a path segment that accesses dict items by key.
Trait Implementations§
source§impl Clone for PathSegment
impl Clone for PathSegment
source§fn clone(&self) -> PathSegment
fn clone(&self) -> PathSegment
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 moresource§impl Debug for PathSegment
impl Debug for PathSegment
Auto Trait Implementations§
impl RefUnwindSafe for PathSegment
impl Send for PathSegment
impl Sync for PathSegment
impl Unpin for PathSegment
impl UnwindSafe for PathSegment
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