Struct dvcompute::simulation::resource::stats::Resource[][src]

pub struct Resource<S> where
    S: QueueStrategy
{ /* fields omitted */ }
Expand description

Represents a simple resource that gathers its statistics.

Implementations

Create a new resource by the specified queue storage and initial count, where the latter becomes the capacity as well.

Create a new resource by the specified queue storage, initial count and optional maximum count, i.e. capacity.

Return the current available count of the resource.

Return the statistics for available count of the resource.

Notifies when the count property changes.

Notifies when the count property changes.

Return the current utilization count of the resource.

Return the statistics for utilization count of the resource.

Notifies when the util_count property changes.

Notifies when the util_count property changes.

Return the current queue length of the resource.

Return the statistics for queue length of the resource.

Notifies when the queue_count property changes.

Notifies when the queue_count property changes.

Return the total wait time of the resource.

Return the statistics for wait time of the resource.

Notifies when the wait_time property changes.

Notifies when the wait_time property changes.

Triggered when one of the Resource properties changes.

Reset the statistics.

Trait Implementations

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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 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.