Struct async_backplane::Device[][src]

pub struct Device { /* fields omitted */ }
Expand description

A Device connects a Future to the backplane.

Implementations

Creates a new Device.

Get the ID of this Device.

Opens a line to the Device.

Notify our peers we’re disconnecting.

Link with another Device with the provided LinkMode. LinkModes are additive, so you can ‘upgrade’ a link this way.

This method is intended for static-style linking, where the topology is not expected to change. You should not link to a Device this way after linking to it through a Line.

Unlink from another Device with the provided LinkMode. LinkModes are subtractive, so you can ‘downgrade’ a link this way.

This method is intended for static-style linking, where the topology is not expected to change. You should not link to a Device this way after linking to it through a Line.

Link with a line. This is safer than linking directly to a Device, but a little slower.

Unlink with a line. This is safer than linking directly to a Device, but a little slower.

Attempts to get the next message. Does not wait for one to arrive.

Returns the first of (with a bias towards the former):

  • The next message to be received.
  • The result of the completed future.
  • The crash of the Device.

Runs an async closure while monitoring for messages. Messages are handled as follows:

  • Disconnects without fault are ignored.
  • Disconnects with fault cause the Device to fault.
  • Requests to disconnect cause the Device to crash but announce a successful completion.

If the provided closure returns successfully, the result is returned along with the Device for re-use. Monitors will not be notified.

If the Device faults, either because the provided closure returned an Err variant or because a fault was propagated, announces our fault to our monitors.

Like part_manage(), but in the case of successful completion of the provided future, notifies our monitors and consumes self

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

Values yielded by the stream.

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more

Returns the bounds on the remaining length of the stream. 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.

Retrieves the next item in the stream. Read more

Counts the number of elements in the stream. Read more

Maps items of the stream to new values using a closure. Read more

Keeps items of the stream for which predicate returns true. Read more

Filters and maps items of the stream using a closure. Read more

Collects all items in the stream into a collection. Read more

Collects all items in the fallible stream into a collection. Read more

Accumulates a computation over the stream. Read more

Accumulates a fallible computation over the stream. Read more

Boxes the stream and changes its type to dyn Stream<Item = T> + Send. Read more

Boxes the stream and changes its type to dyn Stream<Item = T>. 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.