pub struct Component {
pub name: Token,
pub loc: FileLocation,
pub definition: Reference<Token, ComponentDefinitionTarget>,
pub arguments: Vec<Reference<Subject, VariableTarget>>,
}
Expand description
Component instance within a component definition.
Fields§
§name: Token
Name of the component instance.
loc: FileLocation
Location of the entire component instantiation (with arguments).
definition: Reference<Token, ComponentDefinitionTarget>
Definition to which this component instance should adhere.
arguments: Vec<Reference<Subject, VariableTarget>>
Provided arguments, which should resolve to variables.
Trait Implementations§
Source§impl<'a> FetchTarget<'a, Component> for ComponentTarget
impl<'a> FetchTarget<'a, Component> for ComponentTarget
Source§fn fetch_values(
&self,
spec: &'a Specification,
) -> Result<&'a [Component], TargetError<Self>>
fn fetch_values( &self, spec: &'a Specification, ) -> Result<&'a [Component], TargetError<Self>>
Fetch the map reference containing the targeted item.
Source§fn fetch_values_mut(
&self,
spec: &'a mut Specification,
) -> Result<&'a mut [Component], TargetError<Self>>
fn fetch_values_mut( &self, spec: &'a mut Specification, ) -> Result<&'a mut [Component], 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 Component
Auto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl !Send for Component
impl !Sync for Component
impl Unpin for Component
impl UnwindSafe for Component
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