[Canonical page](<https://docs.dhtmlx.com/planning-engine/rust/api/core/resources/leveling-step/>)
[Full documentation index](<https://docs.dhtmlx.com/planning-engine/llms.txt>)


# LevelingStep

Selects how far leveling moves a task in one proposal when it resolves an overallocation. It's the type of [`LevelingOptions::step`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/resources/leveling-options.md#step>). The default is `LevelingStep::Minimal`.

## Declaration

```rust
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub enum LevelingStep {
    #[default]
    Minimal,
    Skip,
}
```

With the `serde` feature, the variants serialize as `"minimal"` and `"skip"`.

## Variants

| Variant | Description |
|---|---|
| `Minimal` | Default. Each proposal moves the task past one overallocated bucket. Leveling then reschedules and picks the task to move again at the next bucket. |
| `Skip` | Each proposal moves the task past the whole overallocated window at once. It takes fewer rounds, but the outcome can differ from `Minimal`, because the buckets it jumps over don't get a new selection. If the jump doesn't fit, leveling falls back to the `Minimal` move for that task. A window of one bucket gives the same move as `Minimal`. |

For when to pick `Skip`, see [Leveling resources](<https://docs.dhtmlx.com/planning-engine/rust/resources-and-assignment/leveling-resources.md#fewer-rounds-with-the-skip-step>).

## Example

```rust
use plen_core::{LevelingOptions, LevelingStep};

fn main() {
    let options = LevelingOptions {
        step: LevelingStep::Skip,
        ..LevelingOptions::default()
    };
    assert_eq!(LevelingOptions::default().step, LevelingStep::Minimal);
    assert_eq!(options.step, LevelingStep::Skip);
}
```

## Related

- [`LevelingOptions`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/resources/leveling-options.md>) - holds the step as its `step` field
- [`LevelingOrder`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/resources/leveling-order.md>) - decides which task the step moves
- [`LevelingResult`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/resources/leveling-result.md>) - its `rounds` count shows the effect of the step
- [Leveling Resources](<https://docs.dhtmlx.com/planning-engine/rust/resources-and-assignment/leveling-resources.md#fewer-rounds-with-the-skip-step>) - compares `Minimal` and `Skip` on one plan
