master
md 19 lines 291 Bytes
Rendered Raw
1 # ContainerState
2
3 `Container::State()` casts directly from `WslcContainerState`.
4
5 Underlying C values:
6
7 - `Invalid = 0`
8 - `Created = 1`
9 - `Running = 2`
10 - `Exited = 3`
11 - `Deleted = 4`
12
13 ```cpp
14 auto state = container.State();
15 if (state == static_cast<ContainerState>(2))
16 {
17 // running
18 }
19 ```