Struct segment_tree::ops::WithIdentity [] [src]

pub struct WithIdentity<A> { /* fields omitted */ }

Adds an identity to an operation by wrapping the type in Option. Clones when combined with None.

Trait Implementations

impl<TA: Clone, A: Operation<TA>> Operation<Option<TA>> for WithIdentity<A>
[src]

[]

The operation that is performed to combine two intervals in the segment tree. Read more

[]

Replace the value in a with combine(a, b). This function exists to allow certain optimizations and by default simply calls combine. Read more

[]

Replace the value in a with combine(a, b). This function exists to allow certain optimizations and by default simply calls combine. Read more

[]

Must return the same as combine. This function exists to allow certain optimizations and by default simply calls combine_mut. Read more

[]

Must return the same as combine. This function exists to allow certain optimizations and by default simply calls combine_mut2. Read more

[]

Must return the same as combine. This function exists to allow certain optimizations and by default simply calls combine_left. Read more

impl<TA: Clone, A: CommutativeOperation<TA>> CommutativeOperation<Option<TA>> for WithIdentity<A>
[src]

impl<TA> Identity<Option<TA>> for WithIdentity<TA>
[src]

[]

Returns any identity.