Struct station::pubsub::Subscriber[][src]

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

The Subscriber receives messages of type T and processes them with a callback.

Implementations

Create a subscriber that listens on a UDP port.

Args:

  • name The name to refer to the subscriber.
  • port: The UDP port to listen for new messages on.
  • callback: The function to call on incoming data.

Create a subscriber that listens on a Unix Datagram socket.

Args:

  • name The name to refer to the subscriber.
  • path: The unix socket path to bind the server to.
  • callback: The function to call on incoming data.

Check if the Subscriber is running.

Stop the Subscriber

Trait Implementations

Executes the destructor for this type. 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 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.