Skip to content

v0.2.0

Choose a tag to compare

@DatAsianBoi123 DatAsianBoi123 released this 23 Aug 01:03
· 178 commits to main since this release
230a896

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 impl Deref and DerefMut. Use .into() and .from() to convert between the inner data.
  • Vec transparent data structs (such as RawData) now impl FromIterator.
  • RawData, Rpc, and Protobuf now all have a from_value impl, meaning they can be received from the server.
  • Vec primitives now all have a from_value impl meaning they can be received from the server.
  • Renamed NetworkTableDataType to NetworkTableData.
  • Field Client.time is now private, use the method Client.time() instead.
  • response_timeout, ping_interval, and update_time_interval are now options that can be changed via NewClientOptions.
  • Serialize and deserialize DataType as a u32 is now private.
  • Type aliases NTServerSender, NTServerReceiver, NTClientSender, and NTClientReceiver are now all pub(crate) instead of pub.
  • New error variants with subscribers and publishers.
  • The module dataframe has been renamed to data.
  • The module dataframe/datatype has been renamed to data/type.
  • Common traits (Clone, PartialEq, Eq, etc.) have now been implemented for many public structs/enums.
  • Many internal structs/enums in the data module are now pub(crate) instead of pub.
  • Reworked how subscribers work to allow for the subscription of multiple topics (using the prefix option, for example).
    Now, announce, update, and unannounce messages are all received.
  • Creating a subscriber no longer returns a Result, but instead Self.
  • ConnectError enum now has many more variants.
  • ConnectError has been moved to the error module.
  • NTAddr.into_addr() now returns a Result and not an Option.

Additions

  • SubscriptionOptions now has an extra field for extra values.
  • The client now keeps track of announced topics using the AnnouncedTopic struct and can be retrieved using the method Client.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::timeout on the future returned by Topic.publish().

Improvements

  • The crate tracing is now used for logging.
  • Much clearer logs.
  • Much better error handling and less panics.

Bug Fixes

  • Subscribing using the periodic option 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!

crates.io
docs.rs