[Canonical page](<https://docs.dhtmlx.com/planning-engine/rust/api/assign/skill-op/>)
[Full documentation index](<https://docs.dhtmlx.com/planning-engine/llms.txt>)


# SkillOp

The comparison a [`SkillMatch`](<https://docs.dhtmlx.com/planning-engine/rust/api/assign/skill-match.md>) applies to a worker's skill value. It's the type of [`SkillMatch::op`](<https://docs.dhtmlx.com/planning-engine/rust/api/assign/skill-match.md>). The default is `SkillOp::AtLeast`. The [`SkillMatch::at_least`](<https://docs.dhtmlx.com/planning-engine/rust/api/assign/skill-match.md#at_least>), [`SkillMatch::no_more`](<https://docs.dhtmlx.com/planning-engine/rust/api/assign/skill-match.md#no_more>) and [`SkillMatch::equal`](<https://docs.dhtmlx.com/planning-engine/rust/api/assign/skill-match.md#equal>) constructors set it for you.

## Declaration

```rust
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub enum SkillOp {
    #[default]
    AtLeast,
    NoMore,
    Equal,
}
```

## Variants

All comparisons are inclusive and read as `worker value <op> match value`. [`SkillMatch`](<https://docs.dhtmlx.com/planning-engine/rust/api/assign/skill-match.md>) gives the value of a skill the worker doesn't list.

| Variant | Description |
|---|---|
| `AtLeast` | Default. Holds when the worker's value is `>=` the match value. |
| `NoMore` | Holds when the worker's value is `<=` the match value. |
| `Equal` | Holds when the worker's value is `==` the match value. |

## Example

```rust
use plen_assign::{SkillMatch, SkillOp};

fn main() {
    let senior = SkillMatch::at_least("rust", 3.0);
    let no_driver = SkillMatch::equal("driver", 0.0);

    assert_eq!(senior.op, SkillOp::AtLeast);
    assert_eq!(no_driver.op, SkillOp::Equal);
    assert_eq!(SkillOp::default(), SkillOp::AtLeast);
}
```

## Related

- [`SkillMatch`](<https://docs.dhtmlx.com/planning-engine/rust/api/assign/skill-match.md>) - the condition that carries this comparison
- [`Skill`](<https://docs.dhtmlx.com/planning-engine/rust/api/assign/skill.md>) - the worker value on the left side of the comparison
- [Skills and Requirements](<https://docs.dhtmlx.com/planning-engine/rust/resources-and-assignment/skills-and-requirements.md>) - shows graded skills compared with thresholds
