pub struct ErrorGraphEdge {
rule_id: BTreeSet<u32>,
cfg: ACSTAConfig,
node: Rc<RefCell<ErrorGraphNode>>,
}Expand description
Edge in the error graph
An edge in the error graph consists of a rule id and a reference to a node.
When inserted into a node a of the error graph, it means that we can
derive the configuration of node by applying the rule with id rule_id to
a.
Fields§
§rule_id: BTreeSet<u32>Ids of the rules used to derive this edge
cfg: ACSTAConfigConfig of the successor node
node: Rc<RefCell<ErrorGraphNode>>Successor node which configuration can be derived by applying the rule
with id rule_id
Implementations§
Source§impl ErrorGraphEdge
impl ErrorGraphEdge
Sourcepub fn new(rule: &CSRule, node: Rc<RefCell<ErrorGraphNode>>) -> Self
pub fn new(rule: &CSRule, node: Rc<RefCell<ErrorGraphNode>>) -> Self
Create a new ErrorGraphEdge
Borrows node immutable during creation of the node
Sourcepub fn get_successor_configuration(&self) -> &ACSTAConfig
pub fn get_successor_configuration(&self) -> &ACSTAConfig
Returns the configuration of the successor node of this edge
Sourcepub fn get_ids_of_rules(&self) -> impl Iterator<Item = u32>
pub fn get_ids_of_rules(&self) -> impl Iterator<Item = u32>
Get the id of the rule that this edge has been derived from
Sourcepub fn node(&self) -> &Rc<RefCell<ErrorGraphNode>>
pub fn node(&self) -> &Rc<RefCell<ErrorGraphNode>>
Get the node this edge leads to
Sourcepub fn insert_to_edge_collection(v: &mut Vec<ErrorGraphEdge>, e: ErrorGraphEdge)
pub fn insert_to_edge_collection(v: &mut Vec<ErrorGraphEdge>, e: ErrorGraphEdge)
Insert a new edge into a collection of error graph edges
Trait Implementations§
Source§impl Clone for ErrorGraphEdge
impl Clone for ErrorGraphEdge
Source§fn clone(&self) -> ErrorGraphEdge
fn clone(&self) -> ErrorGraphEdge
Returns a duplicate of the value. Read more
1.0.0 · 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 ErrorGraphEdge
impl Debug for ErrorGraphEdge
Source§impl Ord for ErrorGraphEdge
impl Ord for ErrorGraphEdge
Source§fn cmp(&self, other: &ErrorGraphEdge) -> Ordering
fn cmp(&self, other: &ErrorGraphEdge) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ErrorGraphEdge
impl PartialEq for ErrorGraphEdge
Source§impl PartialOrd for ErrorGraphEdge
impl PartialOrd for ErrorGraphEdge
impl Eq for ErrorGraphEdge
impl StructuralPartialEq for ErrorGraphEdge
Auto Trait Implementations§
impl Freeze for ErrorGraphEdge
impl !RefUnwindSafe for ErrorGraphEdge
impl !Send for ErrorGraphEdge
impl !Sync for ErrorGraphEdge
impl Unpin for ErrorGraphEdge
impl !UnwindSafe for ErrorGraphEdge
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,
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