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, PATCH_INDICES_SLOT, PATCH_VALUES_SLOT, PATCH_CHUNK_OFFSETS_SLOT);