Struct treap_map::ApplyOpOutcome
source · pub struct ApplyOpOutcome<T> {
pub out: T,
pub update_weight: bool,
pub update_key: bool,
pub delete_item: bool,
}
Expand description
Represents the outcome of an operation applied in the
TreapMap::update
function.
ApplyOpOutcome
is used to convey the result of a user-defined operation
applied to a node in the TreapMap
. It provides details to the TreapMap
about how to properly maintain the node after the operation.
Fields§
§out: T
The value to be forwarded as the return value of the update
function.
update_weight: bool
A flag indicating whether the operation has modified the node’s weight.
If true
, the TreapMap
will recompute the accumulated weights.
update_key: bool
A flag indicating whether the operation has changed the node’s key or
sort key. If true
, the TreapMap
will reposition the node within the
treap.
delete_item: bool
A flag indicating whether the node should be deleted following the
operation. If true
, the TreapMap
will remove the node.