Skip to main content

require_patches

Macro require_patches 

Source
macro_rules! require_patches {
    ($parent:expr, $indices_slot:expr, $values_slot:expr, $chunk_offsets_slot:expr) => { ... };
}
Expand description

Require that patch slots (indices, values, and optionally chunk_offsets) are Primitive. If no patches are present (slots are None), this is a no-op.

Like require_opt_child!, $parent is moved (not cloned) into the early-return path.

require_patches!(
    array,
    MySlots::PATCH_INDICES,
    MySlots::PATCH_VALUES,
    MySlots::PATCH_CHUNK_OFFSETS
);