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§
Structs§
- Configuration
Error - USubscription
Configuration - USubscription
Service - 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. - USubscription
Stopper - This object holds all mutable content associated with a running
USubscriptionService
, and is populated and returned when callingUSubscriptionService::run()
. It exists for two reasons: a) allowUSubscriptionService
to remain useable as an immutable object that can be put intoArc
s and passed around freely, while b) offering a well-defined way to stop a runningUSubscriptionService
by simply callingUSubscriptionStopper::stop()
.
Constants§
- INCLUDE_
SCHEMA - Whether to include ‘up:’ uProtocol schema prefix in URIs in log and error messages
Traits§
- USubscription
Service Abstract - 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.
- UTransport
Holder - 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.