Add Rust tuple conversion support for ergonomic link creation #206
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.
Summary
This PR implements Rust-specific tuple conversion support for Links Notation, enabling ergonomic link creation using native Rust tuple syntax. This feature brings Rust implementation closer to feature parity with C#, which already supports tuple conversion via implicit operators.
Changes
Core Implementation
Fromtrait implementations for tuple toLiNo<String>conversion inrust/src/lib.rs(&str, &str),(String, String), etc.(&str, LiNo<String>), etc.(LiNo<String>, LiNo<String>), etc.Test Coverage
rust/tests/tuple_tests.rsDocumentation
rust/README.mdwith comprehensive tuple conversion sectionREADME.mdto reflect Rust-specific featureUsage Examples
Basic Tuple Conversion
Complex Nested Structures
Testing
All tests pass successfully:
cargo fmt)cargo clippy)Comparison with C#
This implementation mirrors C#'s tuple conversion feature but uses Rust's
Fromtrait instead of implicit operators:C#:
Rust:
Feature Parity
With this PR, Rust now has feature parity with C# for tuple conversion, making the library more ergonomic and intuitive for Rust developers.
Fixes #200
🤖 Generated with Claude Code