pub trait Operation<V, T>{
const COMBINE: fn(left_val: V, right_val: V) -> V;
const PUSH_VAL: fn(val: V, tag: T, len: usize) -> V;
const PUSH_TAG: fn(child_tag: T, tag: T) -> T;
const VAL_IDENTITY: V;
const TAG_IDENTITY: T;
}Expand description
The abstract operation for segment tree.
Required Associated Constants§
Sourceconst COMBINE: fn(left_val: V, right_val: V) -> V
const COMBINE: fn(left_val: V, right_val: V) -> V
Combines two values from left and right child.
Sourceconst PUSH_VAL: fn(val: V, tag: T, len: usize) -> V
const PUSH_VAL: fn(val: V, tag: T, len: usize) -> V
Pushes the tag down to the left or right child.
Sourceconst VAL_IDENTITY: V
const VAL_IDENTITY: V
Identity value for the buffer.
Sourceconst TAG_IDENTITY: T
const TAG_IDENTITY: T
Identity value for the tag.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".