feat/dart-rid-api: rid object combining Rid API and config #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding to the Rid object introduced with the last change, to expose the following:
rid.debugReply
controls how/if replies to requests are logged (wasRID_DEBUG_REPLY
), hasa default
rid.debugLock
controls how/if locking the store on access is logged (wasRID_DEBUG_LOCK
)has a default
rid.replyTimeout
configures theDuration
after which a missing reply for a request mesagesent via the
rid.replyChannel
results in an error (wasRID_REPLY_TIMEOUT
), has a defaultrid.replyChannel
provides access the channel over which replies to requests are sent,namely the
Stream<TReply>rid.replyChannel.stream
which can be used to subscribe to thosereplies (was
replyChannel
)rid.messageChannel
provides access to messages sent to Dart from Rust, i.e. viarid::log_debug!
orrid::error!
macros, namely theStream<RidMessage> rid.messageChannel.stream
which can be used to subscribe to those messages, by default thosemessages aren't handled
Tests and examples here were updated to this API update and I will provide a related PR in
order to adapt them as well.