pub struct Device<'c> {
    pub client: &'c Client,
    /* private fields */
}
Expand description

A Client wrapper that talks to a specific ADS device.

Fields

client: &'c Client

The underlying Client.

Implementations

Read the device’s name + version.

Read some data at a given index group/offset. Returned data can be shorter than the buffer, the length is the return value.

Read some data at a given index group/offset, ensuring that the returned data has exactly the size of the passed buffer.

Write some data to a given index group/offset.

Write some data to a given index group/offset and then read back some reply from there. This is not the same as a write() followed by read(); it is used as a kind of RPC call.

Like write_read, but ensure the returned data length matches the output buffer.

Return the ADS and device state of the device.

(Try to) set the ADS and device state of the device.

Add a notification handle for some index group/offset.

Notifications are delivered via a MPMC channel whose reading end can be obtained from get_notification_channel on the Client object. The returned Handle can be used to check which notification has fired.

If the notification is not deleted explictly using delete_notification and the Handle, it is deleted when the Client object is dropped.

Delete a notification with given handle.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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 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)

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.