#[repr(C)]
pub struct Net {
pub transition_count: u32,
pub place_count: u32,
// some fields omitted
}
A type representing a petri net. It only stores the initial state, not the state used for simulatoin.
The count of transitions of the petri net
The count of places of the petri net
Create a new, empty petri net.
Load a petri net from a file.
Save the petri net to a file. Result represents success.
A slice of nodes representing the transitions of the petri net.
A slice of nodes representing the places of the petri net.
A slice of initial token counts for the places of the petri net.
Add a new transition to the petri net and get the index.
Add a new place to the petri net and get the index.
Make a connection into transition with index tid
from place with index pid
.
Make a connection out from the transitoin with index tid
to place with index pid
.
Result represents success.
Duplicate the transition and get the index of the clone.
Duplicate the place and get the index of the clone.
Increase the initial token count in place indexed by pid
.
Executes the destructor for this type. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static