#[non_exhaustive]pub enum CombineOp {
Replace,
Add,
}Expand description
The combine operation for an overlay composition (composition_rule = 0x02).
Selects how a correction member’s value at a covered index combines with the value shown by lower-precedence members (down to the base).
§Examples
use hurray_core::layout::CombineOp;
assert_eq!(CombineOp::Replace.wire_byte(), 0x01);
assert_eq!(CombineOp::Add.wire_byte(), 0x02);
assert_eq!(CombineOp::from_wire(0x01), Some(CombineOp::Replace));
assert_eq!(CombineOp::from_wire(0x00), None);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Replace
Last-wins: the topmost (latest-emitted) member covering an index wins
within its box, and the base shows through elsewhere. Wire byte 0x01.
Add
The value at an index is the base value plus the sum of all covering
corrections’ values at that index. Wire byte 0x02.
Implementations§
Trait Implementations§
impl Copy for CombineOp
impl Eq for CombineOp
impl StructuralPartialEq for CombineOp
Auto Trait Implementations§
impl Freeze for CombineOp
impl RefUnwindSafe for CombineOp
impl Send for CombineOp
impl Sync for CombineOp
impl Unpin for CombineOp
impl UnsafeUnpin for CombineOp
impl UnwindSafe for CombineOp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more