Struct procfs::process::Task[][src]

pub struct Task {
    pub pid: i32,
    pub tid: i32,
    // some fields omitted
}
Expand description

A task (aka Thread) inside of a Process

Created by Process::tasks, tasks in general are similar to Processes and should have mostly the same fields.

Fields

pid: i32

The ID of the process that this task belongs to

tid: i32

The task ID

Implementations

Create a new Task

Thread info from /proc/<pid>/task/<tid>/stat

Many of the returned fields will be the same as the parent process, but some fields like utime and stime will be per-task

Thread info from /proc/<pid>/task/<tid>/status

Many of the returned fields will be the same as the parent process

Thread IO info from /proc/<pid>/task/<tid>/io

This data will be unique per task.

Thread scheduler info from /proc/<pid>/task/<tid>/schedstat

This data will be unique per task.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.