Struct pns::Net[][src]

#[repr(C)]
pub struct Net { pub transition_count: u32, pub place_count: u32, // some fields omitted }
Expand description

A type representing a petri net. It only stores the initial state, not the state used for simulatoin.

Fields

transition_count: u32

The count of transitions of the petri net

place_count: u32

The count of places of the petri net

Implementations

Create a new, empty petri net.

Load a petri net from a file.

Remove a transition at index tid from petri net.

Make a connection into transition with index tid from place with index pid. Result represents success.

Remove the connection out from transition with index tid to place with index pid.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Save the petri net to a file. Result represents success.

A slice of nodes representing the transitions of the petri net.

Returns the index of the next reusable transition.

A slice of nodes representing the places of the petri net.

Returns the index of the next reusable place.

A slice of initial token counts for the places of the petri net.

Add a new place to the petri net and get the index.

Add a new transition to the petri net and get the index.

Add a new transition to the petri net, connct it to the specified places and get the index.

Remove a place at index pid from petri net.

Make a connection out from the transitoin with index tid to place with index pid. Result represents success. Read more

Make a connection into transition with index tid from place with index pid.

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.

Creates a dynamic net type from a net.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.