pub struct State { /* private fields */ }
Expand description

The data backing a mock Lava instance

This is a persian_rug::Context containing all of the different data types that make up the database of a Lava instance.

Implementations

Create a new empty State

A DeviceType GeneratorWithPersianRug that uses dependencies already in the State.

This generator is equivalent to the default, except that it draws Alias, Architecture, BitWidth, Core and ProcessorFamily instances from those already in the containing State at the point of generation.

A User GeneratorWithPersianRug that uses dependencies already in the State.

This generator is equivalent to the default, except that it draws Group instances from those already in the containing State at the point of generation.

A Device GeneratorWithPersianRug that uses dependencies already in the State.

This generator is equivalent to the default, except that it draws DeviceType, User, Group, Tag and Worker instances from those already in the containing State at the point of generation.

A Job GeneratorWithPersianRug that uses dependencies already in the State.

This generator is equivalent to the default, except that it draws User, Group, DeviceType, Tag and Device instances from those already in the containing State at the point of generation.

Create a new State with some initial data.

Here, pop is a PopulationParams which gives the initial number of each type of object. The object generators are customised to draw their references from the other objects in the state.

You can obtain new instances of themodified generators from make_device_generator, make_device_type_generator, make_job_generator and make_user_generator if you need to create more objects in a similar fashion.

Note that because tests are per-job objects, the counts in PopulationParams for TestCase, TestSet and TestSuite are used to make custom objects for each job. The tests are not provided automatically when jobs are generated by the underlying GeneratorWithPersianRug provided by make_job_generator.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Insert the given value, returning a Proxy for it.
Retrieve a reference to a value from a Proxy.
Retrieve a mutable reference to a value from a Proxy.
Iterate over the values currently stored.
Mutably iterate over the values currently stored.
Iterate over (owned) proxies for the values currently stored.
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more
Insert the given value, obtaining a Proxy for it.
Get a shared reference to a value from a Proxy for it.
Get an exclusive reference to a value from a Proxy for it.
Iterate over shared references to the stored values.
Iterate over exclusive references to the stored values.
Iterate over shared references to Proxy objects for the stored values. Read more

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

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more