pub struct Variable {
pub name: Token,
pub loc: FileLocation,
pub definition: Reference<Token, TypeDefinitionTarget>,
pub is_property: bool,
}
Expand description
Single variable.
Fields§
§name: Token
Name of this variable.
loc: FileLocation
Location of the variable’s instantiation.
definition: Reference<Token, TypeDefinitionTarget>
Type definition of this variable.
is_property: bool
Whether this is a property of some component.
Trait Implementations§
Source§impl<'a> FetchTarget<'a, Variable> for ParameterTarget
impl<'a> FetchTarget<'a, Variable> for ParameterTarget
Source§fn fetch_values(
&self,
spec: &'a Specification,
) -> Result<&'a [Variable], TargetError<Self>>
fn fetch_values( &self, spec: &'a Specification, ) -> Result<&'a [Variable], TargetError<Self>>
Fetch the map reference containing the targeted item.
Source§fn fetch_values_mut(
&self,
spec: &'a mut Specification,
) -> Result<&'a mut [Variable], TargetError<Self>>
fn fetch_values_mut( &self, spec: &'a mut Specification, ) -> Result<&'a mut [Variable], TargetError<Self>>
Fetch the mutable map reference containing the targeted item.
Source§fn fetch(&self, spec: &'a Specification) -> Result<&'a V, TargetError<Self>>
fn fetch(&self, spec: &'a Specification) -> Result<&'a V, TargetError<Self>>
Fetch a reference to the target from the specification.
Source§fn fetch_mut(
&self,
spec: &'a mut Specification,
) -> Result<&'a mut V, TargetError<Self>>
fn fetch_mut( &self, spec: &'a mut Specification, ) -> Result<&'a mut V, TargetError<Self>>
Fetch a mutable reference to the target from the specification.
Source§impl<'a> FetchTarget<'a, Variable> for VariableTarget
impl<'a> FetchTarget<'a, Variable> for VariableTarget
Source§fn fetch_values(
&self,
spec: &'a Specification,
) -> Result<&'a [Variable], TargetError<Self>>
fn fetch_values( &self, spec: &'a Specification, ) -> Result<&'a [Variable], TargetError<Self>>
Fetch the map reference containing the targeted item.
Source§fn fetch_values_mut(
&self,
spec: &'a mut Specification,
) -> Result<&'a mut [Variable], TargetError<Self>>
fn fetch_values_mut( &self, spec: &'a mut Specification, ) -> Result<&'a mut [Variable], TargetError<Self>>
Fetch the mutable map reference containing the targeted item.
Source§fn fetch(&self, spec: &'a Specification) -> Result<&'a V, TargetError<Self>>
fn fetch(&self, spec: &'a Specification) -> Result<&'a V, TargetError<Self>>
Fetch a reference to the target from the specification.
Source§fn fetch_mut(
&self,
spec: &'a mut Specification,
) -> Result<&'a mut V, TargetError<Self>>
fn fetch_mut( &self, spec: &'a mut Specification, ) -> Result<&'a mut V, TargetError<Self>>
Fetch a mutable reference to the target from the specification.
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl !Send for Variable
impl !Sync for Variable
impl Unpin for Variable
impl UnwindSafe for Variable
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