pub struct Transition { /* private fields */ }Expand description
A transition in the Time Petri Net that transforms tokens.
Transitions use identity-based equality (TransitionId) — each instance is unique regardless of name. The name is purely a label for display/debugging/export.
Implementations§
Source§impl Transition
impl Transition
Sourcepub fn id(&self) -> TransitionId
pub fn id(&self) -> TransitionId
Returns the unique transition ID.
Sourcepub fn input_specs(&self) -> &[In]
pub fn input_specs(&self) -> &[In]
Returns the input specifications.
Sourcepub fn output_spec(&self) -> Option<&Out>
pub fn output_spec(&self) -> Option<&Out>
Returns the output specification, if any.
Sourcepub fn inhibitors(&self) -> &[Inhibitor]
pub fn inhibitors(&self) -> &[Inhibitor]
Returns the inhibitor arcs.
Sourcepub fn action_timeout(&self) -> Option<u64>
pub fn action_timeout(&self) -> Option<u64>
Returns the action timeout in ms, if any.
Sourcepub fn has_action_timeout(&self) -> bool
pub fn has_action_timeout(&self) -> bool
Returns true if this transition has an action timeout.
Sourcepub fn action(&self) -> &BoxedAction
pub fn action(&self) -> &BoxedAction
Returns the transition action.
Sourcepub fn input_places(&self) -> &HashSet<PlaceRef>
pub fn input_places(&self) -> &HashSet<PlaceRef>
Returns set of input place refs (consumed tokens).
Sourcepub fn read_places(&self) -> &HashSet<PlaceRef>
pub fn read_places(&self) -> &HashSet<PlaceRef>
Returns set of read place refs (context tokens, not consumed).
Sourcepub fn output_places(&self) -> &HashSet<PlaceRef>
pub fn output_places(&self) -> &HashSet<PlaceRef>
Returns set of output place refs (where tokens are produced).
Trait Implementations§
Source§impl Clone for Transition
impl Clone for Transition
Source§fn clone(&self) -> Transition
fn clone(&self) -> Transition
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 Transition
impl Debug for Transition
Source§impl Display for Transition
impl Display for Transition
Source§impl Hash for Transition
impl Hash for Transition
Source§impl PartialEq for Transition
impl PartialEq for Transition
impl Eq for Transition
Auto Trait Implementations§
impl Freeze for Transition
impl !RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnsafeUnpin for Transition
impl !UnwindSafe for Transition
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