pub struct QWSTransaction<'a> { /* private fields */ }Expand description
Represents a transaction in the QuantumWorldState, and provides methods to inspect the transaction.
A QWSTransaction can function as a special kind of view, and can be converted into a view by calling the view() method.
Implementations§
Source§impl<'a> QWSTransaction<'a>
impl<'a> QWSTransaction<'a>
Sourcepub fn id(&self) -> QWSTransactionID
pub fn id(&self) -> QWSTransactionID
Returns the QWSTransactionID of the transaction. Useful for accessing the id of a newly created transaction.
Sourcepub fn created_elements(&self) -> &[QWSElementID]
pub fn created_elements(&self) -> &[QWSElementID]
Returns a reference to a slice containing all the QWSElementIDs of elements created by the transaction.
Sourcepub fn destroyed_elements(&self) -> &[QWSElementID]
pub fn destroyed_elements(&self) -> &[QWSElementID]
Returns a reference to a slice containing all the QWSElementIDs of elements destroyed by the transaction.
Sourcepub fn entangled_elements(&self) -> &[QWSElementID]
pub fn entangled_elements(&self) -> &[QWSElementID]
Returns a reference to a slice containing all the QWSElementIDs of elements entangled by the transaction.
Sourcepub fn view(self) -> QWSDataView<'a>
pub fn view(self) -> QWSDataView<'a>
Creates a QWSDataView from the QWSTransaction. Since a transation is already a specific type of view, this transformation is guaranteed to succeed.