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
communicationmodule, 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.uattributesmodule, with uProtocol message attribute types and validatorsumessagemodule, which defines the uProtocol core message type and provides related convenience functionalityupayloadmodule, which defines payload representation for uProtocol messagesurimodule, providing convenience wrappers for creation and validation of uProtocol-style resource identifiersustatusmodule, which provices uProtocol types for representing status and status codesutransportmodule, as an interface contract between uProtocol and specific transport protocol implementationsuuidmodule, 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
communicationenables support for the Communication Layer API and its default implementation on top of the Transport Layer API. Enabled by default.udiscoveryenables support for types required to interact with uDiscovery service implementations.usubscriptionenables support for types required to interact with uSubscription service implementations. Enabled by default.utwinenables support for types required to interact with uTwin service implementations.
§References
Modules§
Structs§
- A wrapper type that allows comparing
UListeners to each other. - Validates attributes describing a Notification message.
- Validates attributes describing a Publish message.
- Validate
UAttributeswith typeUMessageType::Request - Validate
UAttributeswith typeUMessageType::Response - A builder for creating
UMessages.
Enums§
- Enum that hold the implementations of uattributesValidator according to type.
Traits§
- A factory for URIs representing this uEntity’s resources.
UAttributesis 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 ofUAttributesdefines 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.