Releases: DatAsianBoi123/nt_client
Releases · DatAsianBoi123/nt_client
v0.4.0
This release adds some final touches to the lib before version 1.0.0.
Full Changelog: v0.3.0-alpha...v0.4.0-alpha
Breaking Changes
- Method
Topic::name_mutnow returns a&mut Stringinstead of a&mut str. AnnouncedTopicsandAnnouncedTopicstructs no longer implementEq.- Trait
NetworkTableDatano longer has aClonerequirement. - Removed error variants
ReceiveMessageError::FailedDeserializingJsonandReceiveMessageError::FailedDeserializingMsgPackin favor of warn logs Topic::subscribeandTopicCollection::subscribenow return aResult.
Additions
- Created method
Client.connect_setupthat allows a callback to be called once the client has connected. DataTypenow implementsCopy- Created a non-generic version of
Publisherto allow for publishing arbitrary data at runtime viaTopic::generic_publish. - Created a way to retrieve a topic's value via
AnnouncedTopic::value. - Added feature
publish_bypassthat adds bypass versions of publishing as a workaround to a NetworkTables bug. - Created a cheaply-clonable
ClientHandle, accessed viaClient::handle, that can be used in asynchronous environments.
Improvements
- Tracing is now much more reliable and contains more information.
- Channel capacity for websocket messages greatly increased, reducing lagged errors.
- Several more docs are now clearer and include examples.
v0.3.0
This release adds support for topic properties and a reconnection handler, among other additions.
Breaking Changes
- Split the
portfield inNewClientOptionsintounsecure_portandsecure_port setandset_defaultmethods ofPublishernow return a result
Additions
- Reconnect handling via the
crate::reconnectfunction TopicPathstruct andpath!macro for easy manipulation of slash-delimited topic names- Creation of
TopicCollection, allowing for the subscription of multiple topics at once - Support for updating topic properties via
Publisher.update_propsandUpdatePropsstruct - More examples
...and other various improvements!
v0.2.0
This release adds many many features and actually makes this crate somewhat usable! Expect a full 1.0.0 release within the next few versions.
Breaking Changes
- Transparent data structs (such as
JsonString) no longer implDerefandDerefMut. Use.into()and.from()to convert between the inner data. - Vec transparent data structs (such as
RawData) now implFromIterator. RawData,Rpc, andProtobufnow all have afrom_valueimpl, meaning they can be received from the server.- Vec primitives now all have a
from_valueimpl meaning they can be received from the server. - Renamed
NetworkTableDataTypetoNetworkTableData. - Field
Client.timeis now private, use the methodClient.time()instead. response_timeout,ping_interval, andupdate_time_intervalare now options that can be changed viaNewClientOptions.- Serialize and deserialize
DataTypeas au32is now private. - Type aliases
NTServerSender,NTServerReceiver,NTClientSender, andNTClientReceiverare now allpub(crate)instead ofpub. - New error variants with subscribers and publishers.
- The module
dataframehas been renamed todata. - The module
dataframe/datatypehas been renamed todata/type. - Common traits (
Clone,PartialEq,Eq, etc.) have now been implemented for many public structs/enums. - Many internal structs/enums in the
datamodule are nowpub(crate)instead ofpub. - Reworked how subscribers work to allow for the subscription of multiple topics (using the
prefixoption, for example).
Now, announce, update, and unannounce messages are all received. - Creating a subscriber no longer returns a
Result, but insteadSelf. ConnectErrorenum now has many more variants.ConnectErrorhas been moved to theerrormodule.NTAddr.into_addr()now returns aResultand not anOption.
Additions
SubscriptionOptionsnow has anextrafield for extra values.- The client now keeps track of announced topics using the
AnnouncedTopicstruct and can be retrieved using the methodClient.announced_topics(). - Created method
Subscriber.topics()that retrieves all subscribed topics.
Changes
- Publishing now doesn't have a timeout. If a timeout is still necessary, use
tokio::time::timeouton the future returned byTopic.publish().
Improvements
- The crate
tracingis now used for logging. - Much clearer logs.
- Much better error handling and less panics.
Bug Fixes
- Subscribing using the
periodicoption now works as intended. - Creating a client before the server no longer panics.
Docs
- Added documentation for the whole crate.
...and many other various improvements!
v0.1.0
Initial release.
Features include:
- Full coverage of the NetworkTables 4.1 spec
- Publishing to topics
- Subscribing to topics