Crate up_subscription

Source
Expand description

up-subscription is an implementation of the Eclipse uProtocol™ USubscription service for the rust programming language.

This crate can be used to configure and run a USubscription service as part of your rust application, implementing the interface defined by the uProtocol protobuf core API specification.

§Library contents

  • usubscription service as an frontend for the subscription management and notification handler actors.
  • listeners module, with UListener trait implementations for all functions defined by the USubscription API

§Note

For a batteries-included approach to running up-subscription-rust, the up-subscription-cli module provides a command line frontend for running the USubscription service. It is available via the project’s github repo.

§References

Modules§

listeners

Structs§

ConfigurationError
USubscriptionConfiguration
USubscriptionService
Core landing point and coordination of business logic of the uProtocol USubscription service. This implementation usually would be front-ended by the various listeners to connect with corresponding uProtocol RPC server endpoints.
USubscriptionStopper
This object holds all mutable content associated with a running USubscriptionService, and is populated and returned when calling USubscriptionService::run(). It exists for two reasons: a) allow USubscriptionService to remain useable as an immutable object that can be put into Arcs and passed around freely, while b) offering a well-defined way to stop a running USubscriptionService by simply calling USubscriptionStopper::stop().

Constants§

INCLUDE_SCHEMA
Whether to include ‘up:’ uProtocol schema prefix in URIs in log and error messages

Traits§

USubscriptionServiceAbstract
This trait (and the comprised UTransportHolder trait) is simply there to have a generic type that usubscription Listeners deal with, so that USubscriptionService can be properly mocked.
UTransportHolder
This trait primarily serves to provide a hook-point for using the mockall crate, for mocking USubscriptionService objects where we also need/want to inject custom/mock UTransport implementations that subsequently get used in test cases.

Functions§

init_once