pub struct Chip { /* private fields */ }
Expand description

A GPIO character device.

Implementations

Constructs a Chip using the given path.

The path must resolve to a valid GPIO character device.

Constructs a Chip using the given name.

The name must resolve to a valid GPIO character device.

Get the information for the chip.

Return the name of the chip.

This is based on the filename component of the resolved chip path, not the name from the Info, so it does not involve any system calls.

Return the path of the chip.

Find the info for the named line.

Returns the first matching line.

Get the information for a line on the chip.

An iterator that returns the info for each line on the chip.

Add a watch for changes to the publicly available information on a line.

This is a null operation if there is already a watch on the line.

Remove a watch for changes to the publicly available information on a line.

This is a null operation if there is no existing watch on the line.

Check if the request has at least one info change event available to read.

Wait for an info change event to be available.

Read a single line info change event from the chip.

Will block until an edge event is available.

An iterator for info change events from the chip.

Detect the most recent uAPI ABI supported by the library for the chip.

Check if the platform and library support a specific ABI version.

Trait Implementations

Extracts the raw file descriptor. Read more
Converts this type into a shared reference of the (usually inferred) input type.
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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.