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


# ProfileTasks

Selects which buckets of a load profile list their booked task ids. It's the type of [`ProfileQuery::tasks`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/resources/profile-query.md>), and the choice fills [`LoadBucket::tasks`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/resources/load-bucket.md>). The default is `ProfileTasks::None`.

## Declaration

```rust
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub enum ProfileTasks {
    #[default]
    None,
    Over,
    All,
}
```

## Variants

| Variant | Description |
|---|---|
| `None` | Default. No bucket lists tasks: `LoadBucket::tasks` is `None` in every bucket. |
| `Over` | Only overallocated buckets (`load > capacity`) list their tasks. Every other bucket gets `Some` with an empty list. |
| `All` | Every bucket lists the tasks booked in it. A bucket with no bookings gets `Some` with an empty list. |

## Example

```rust
use plen_core::{DateTime, ProfileQuery, ProfileTasks};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let from = DateTime::from_ymd_hm(2026, 8, 10, 0, 0).ok_or("invalid date")?;
    let to = DateTime::from_ymd_hm(2026, 8, 15, 0, 0).ok_or("invalid date")?;

    let mut query = ProfileQuery::new(from, to);
    assert_eq!(query.tasks, ProfileTasks::None);

    // List booked tasks only in overallocated buckets.
    query.tasks = ProfileTasks::Over;
    Ok(())
}
```

## Related

- [`ProfileQuery`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/resources/profile-query.md>) - holds the choice as its `tasks` field
- [`LoadBucket`](<https://docs.dhtmlx.com/planning-engine/rust/api/core/resources/load-bucket.md>) - the bucket whose `tasks` the choice fills
- [Resource Load](<https://docs.dhtmlx.com/planning-engine/rust/resources-and-assignment/resource-load.md#task-lists-per-bucket>) - lists the tasks in overallocated buckets
- [Previewing Changes](<https://docs.dhtmlx.com/planning-engine/rust/live-projects/previewing-changes.md#preview-with-load>) - requests task lists in a preview
