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