compare the value of this mutable field with an `expected` value. If it is bitwise equal, replace the value by with the `modified` value.
Independently of whether the value was replaced, return the original value. I.e., the value was replaced iff `result` is bitwise equal to `e`.
Note that bitwise equality may differ from equality defined by `property.equatable.type.equality`. In particular, e.g., for `f64`, we have `0.0 = -0.0` while both values differ when compared bit by bit.
For a reference type `T`, this operation will compare the internal representation of the reference value, not the referenced value. In particular, this means that references that are typically equal like `id String "Hello!"` and `id String "Hello" + "!"` may be represented by distinct `String` reference values.
Check that the mutate effect this was created with is still instated in the current environment.
Different kinds of mutate will make different efforts for synchronization:
- for a thread-local `mutate`, this can be used only by the thread that instated the `mutate`, no synchronization will be performed.
- for a `concur.blocking_mutate`/`concur.blocking_mutate_using_clock`, this will use `exclusive` to ensure atomicity
- for a `atomic_mutate`, this will use an atomic compare-and-set operation.
equal, replace the value by with the `modified` value.
Independently of whether the value was replaced, return the original value. I.e.,
the value was replaced iff `result` is bitwise equal to `e`.
Note that bitwise equality may differ from equality defined by
`property.equatable.type.equality`. In particular, e.g., for `f64`, we have
`0.0 = -0.0` while both values differ when compared bit by bit.
For a reference type `T`, this operation will compare the internal representation
of the reference value, not the referenced value. In particular, this means that
references that are typically equal like `id String "Hello!"` and
`id String "Hello" + "!"` may be represented by distinct `String` reference
values.
Check that the mutate effect this was created with is still
instated in the current environment.
Different kinds of mutate will make different efforts for synchronization:
- for a thread-local `mutate`, this can be used only by the thread that instated
the `mutate`, no synchronization will be performed.
- for a `concur.blocking_mutate`/`concur.blocking_mutate_using_clock`, this will
use `exclusive` to ensure atomicity
- for a `atomic_mutate`, this will use an atomic compare-and-set operation.