eclipse-uprotocol / up-rust

uProtocol Language Specific Library for Rust
Apache License 2.0
11 stars 9 forks source link

Make CallOptions immutable #136

Closed sophokles73 closed 3 months ago

sophokles73 commented 3 months ago

Changed CallOptions struct to only support setting fields by means of constructors, effectively making it immutable. This way we will have better control over which fields may or may not be set for the different types of messages to use the CallOptions for.

Also removed the traceparent field because it should not be necessary to explicitly set it. Instead, when a UMessage is created, the current span will be looked up in the current thread/future context.

This is for #122