pub struct LinkedItemGraph { /* private fields */ }Expand description
A graph of items connected via the hax attribute AttrPayload::AssociatedItem and UUIDs.
Implementations§
Source§impl LinkedItemGraph
impl LinkedItemGraph
Sourcepub fn new(items: &[Item], context: Context) -> Self
pub fn new(items: &[Item], context: Context) -> Self
Clone items marked with UUIDs attributes to build a graph of linked items. This graph clones the items that represent linked items: e.g. pre and post conditions.
Sourcepub fn linked_items_iter(
&self,
item: &impl HasMetadata,
) -> impl Iterator<Item = (AssociationRole, Result<&Item, DiagnosticInfo>)>
pub fn linked_items_iter( &self, item: &impl HasMetadata, ) -> impl Iterator<Item = (AssociationRole, Result<&Item, DiagnosticInfo>)>
Given a graph and an item item, returns an iterator of the various items that are linked with item.
Sourcepub fn linked_items(
&self,
item: &impl HasMetadata,
) -> HashMap<AssociationRole, Vec<Result<&Item, DiagnosticInfo>>>
pub fn linked_items( &self, item: &impl HasMetadata, ) -> HashMap<AssociationRole, Vec<Result<&Item, DiagnosticInfo>>>
Returns the items linked to a given item.
Sourcepub fn fn_like_linked_expressions(
&self,
item: &impl HasMetadata,
self_id: Option<LocalId>,
) -> FnLikeAssocatedExpressions
pub fn fn_like_linked_expressions( &self, item: &impl HasMetadata, self_id: Option<LocalId>, ) -> FnLikeAssocatedExpressions
Returns the precondition, postcondition and decreases clause, if any, for a given item.
When operating on a linked function, self_id is the local identifier of self.
Trait Implementations§
Source§impl Clone for LinkedItemGraph
impl Clone for LinkedItemGraph
Source§fn clone(&self) -> LinkedItemGraph
fn clone(&self) -> LinkedItemGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LinkedItemGraph
impl Debug for LinkedItemGraph
Auto Trait Implementations§
impl Freeze for LinkedItemGraph
impl RefUnwindSafe for LinkedItemGraph
impl Send for LinkedItemGraph
impl Sync for LinkedItemGraph
impl Unpin for LinkedItemGraph
impl UnsafeUnpin for LinkedItemGraph
impl UnwindSafe for LinkedItemGraph
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more