Crate up_rust

source ·
Expand description

up-rust is the Eclipse uProtocol™ Language Library for the Rust programming language.

This crate can be used to

  • implement uEntities that communicate with each other using the uProtocol Communication Layer API over one of the supported transport protocols.
  • implement support for an additional transport protocol by means of implementing the Transport Layer API.

§Library contents

  • communication module, which defines uProtocol’s Communication Layer API for publishing and subscribing to topics and invoking RPC methods. It also contains a default implementation employing the Transport Layer API.
  • uattributes module, with uProtocol message attribute types and validators
  • umessage module, which defines the uProtocol core message type and provides related convenience functionality
  • upayload module, which defines payload representation for uProtocol messages
  • uri module, providing convenience wrappers for creation and validation of uProtocol-style resource identifiers
  • ustatus module, which provices uProtocol types for representing status and status codes
  • utransport module, as an interface contract between uProtocol and specific transport protocol implementations
  • uuid module, which generates and validates UUIDs as per the uProtocol specification

For user convenience, all of these modules export their types on up_rust top-level, except for (future) optional features.

§Features

  • communication enables support for the Communication Layer API and its default implementation on top of the Transport Layer API. Enabled by default.
  • udiscovery enables support for types required to interact with uDiscovery service implementations.
  • usubscription enables support for types required to interact with uSubscription service implementations. Enabled by default.
  • utwin enables support for types required to interact with uTwin service implementations.
  • util provides some useful helper structs. In particular, provides a local, in-memory UTransport for exchanging messages within a single process. This transport is also used by the examples illustrating usage of the Communication Layer API.

§References

Modules§

Structs§

Enums§

Traits§

  • A factory for URIs representing this uEntity’s resources.
  • UAttributes is the struct that defines the Payload. It serves as the configuration for various aspects like time to live, priority, security tokens, and more. Each variant of UAttributes defines a different type of message payload. The payload could represent a simple published payload with some state change, an RPC request payload, or an RPC response payload.
  • A handler for processing uProtocol messages.
  • The uProtocol Transport Layer interface that provides a common API for uEntity developers to send and receive messages.