pub struct RwRefAccess<T> {
    base: Arc<RwLock<T>>,
}
Expand description

Wrapper around a Netlist or Layout, etc. into a Arc<RwLock<_>> to provide save read and write access. Access is checked at runtime. If only read access is required, then it might be more efficient to use crate::reference_access.

In contrast to the API of HierarchyBase and others the object-like API avoids returning iterators but returns vectors of elements. This allows to keep the lock-time short.

Fields

base: Arc<RwLock<T>>

Implementations

Get read access to the underlying data structure.

Panics

Panics when called during an ongoing write access.

Get exclusive write access to the underlying data structure.

Panics

Panics when called during an ongoing read or write access.

Get a cell ‘object’ by its ID.

Get a cell instance ‘object’ by its ID.

Get a vector with all cells.

Get the number of cells.

Find a cell by its name.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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

Returns the argument unchanged.

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.