Net

Trait Net 

Source
pub trait Net: Debug {
    type Place: Place;
    type Transition: Transition;
    type Arc: Arc;

Show 14 methods // Required methods fn places(&self) -> Vec<&Self::Place>; fn place(&self, id: &NodeId) -> Option<&Self::Place>; fn place_mut(&mut self, id: &NodeId) -> Option<&mut Self::Place>; fn add_place(&mut self) -> NodeId; fn add_labeled_place<S>(&mut self, label: S) -> NodeId where S: Into<String>; fn transitions(&self) -> Vec<&Self::Transition>; fn transition(&self, id: &NodeId) -> Option<&Self::Transition>; fn transition_mut(&mut self, id: &NodeId) -> Option<&mut Self::Transition>; fn add_transition(&mut self) -> NodeId; fn add_labeled_transition<S>(&mut self, label: S) -> NodeId where S: Into<String>; fn arcs(&self) -> Vec<&Self::Arc>; fn add_arc(&mut self, source: NodeId, target: NodeId); fn inputs(&self, id: &NodeId) -> Vec<&NodeId>; fn outputs(&self, id: &NodeId) -> Vec<&NodeId>;
}
Expand description

This is the core trait for a Net \(N\) comprising a set of places \(P\), a set of transitions \(T\), and a set of arcs \(A\) such that \(N=\left\langle P,T,A \right\rangle\)

Required Associated Types§

Required Methods§

Source

fn places(&self) -> Vec<&Self::Place>

Source

fn place(&self, id: &NodeId) -> Option<&Self::Place>

Source

fn place_mut(&mut self, id: &NodeId) -> Option<&mut Self::Place>

Source

fn add_place(&mut self) -> NodeId

Source

fn add_labeled_place<S>(&mut self, label: S) -> NodeId
where S: Into<String>,

Source

fn transitions(&self) -> Vec<&Self::Transition>

Source

fn transition(&self, id: &NodeId) -> Option<&Self::Transition>

Source

fn transition_mut(&mut self, id: &NodeId) -> Option<&mut Self::Transition>

Source

fn add_transition(&mut self) -> NodeId

Source

fn add_labeled_transition<S>(&mut self, label: S) -> NodeId
where S: Into<String>,

Source

fn arcs(&self) -> Vec<&Self::Arc>

Source

fn add_arc(&mut self, source: NodeId, target: NodeId)

Source

fn inputs(&self, id: &NodeId) -> Vec<&NodeId>

Source

fn outputs(&self, id: &NodeId) -> Vec<&NodeId>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§