pub struct VarName { /* private fields */ }
Expand description
In TCL, variable references have two forms. A string like “some_var(some_index)” is
the name of an array element; any other string is the name of a scalar variable. This
struct is used when parsing variable references. The name
is the variable name proper;
the index
is either None
for scalar variables or Some(String)
for array elements.
The Molt interp
’s variable access API usually handles this automatically. Should a
command need to distinguish between the two cases it can do so by using the
the Value
struct’s Value::as_var_name
method.
Implementations§
Trait Implementations§
impl Eq for VarName
impl StructuralPartialEq for VarName
Auto Trait Implementations§
impl Freeze for VarName
impl RefUnwindSafe for VarName
impl Send for VarName
impl Sync for VarName
impl Unpin for VarName
impl UnwindSafe for VarName
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.