Merged
Conversation
altonen
approved these changes
Jul 27, 2025
Member
altonen
left a comment
There was a problem hiding this comment.
Ty! Left a few documentation nits.
You also need to re-export DatagramOptions in src/lib.rs, i.e., add DatagramOptions to pub use options::{...}
Comment on lines
+402
to
+423
| #[derive(Default)] | ||
| pub struct DatagramOptions { | ||
| /// Overrides the source port | ||
| pub from_port: u16, | ||
|
|
||
| /// Overrides the destination port | ||
| pub to_port: u16, | ||
|
|
||
| /// Overrides the I2P protocol used | ||
| /// | ||
| /// Only for RAW/Anonymous sessions | ||
| pub protocol: u8, | ||
|
|
||
| /// Overrides the crypto_tags_to_send I2CP option | ||
| pub send_tags: usize, | ||
|
|
||
| /// Overrides the crypto_low_tag_threshold I2CP option | ||
| pub tag_threshold: usize, | ||
|
|
||
| /// Overrides the should_bundle_reply_info I2CP option | ||
| pub send_leaseset: bool, | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| #[derive(Default)] | |
| pub struct DatagramOptions { | |
| /// Overrides the source port | |
| pub from_port: u16, | |
| /// Overrides the destination port | |
| pub to_port: u16, | |
| /// Overrides the I2P protocol used | |
| /// | |
| /// Only for RAW/Anonymous sessions | |
| pub protocol: u8, | |
| /// Overrides the crypto_tags_to_send I2CP option | |
| pub send_tags: usize, | |
| /// Overrides the crypto_low_tag_threshold I2CP option | |
| pub tag_threshold: usize, | |
| /// Overrides the should_bundle_reply_info I2CP option | |
| pub send_leaseset: bool, | |
| } | |
| /// Datagram options. | |
| #[derive(Default)] | |
| pub struct DatagramOptions { | |
| /// Overrides the source port. | |
| /// | |
| /// Defaults to `0`. | |
| pub from_port: u16, | |
| /// Overrides the destination port. | |
| /// | |
| /// Defaults to `0`. | |
| pub to_port: u16, | |
| /// Overrides the I2P protocol used. | |
| /// | |
| /// Only for RAW/Anonymous sessions. | |
| /// | |
| /// Defaults to `18`. | |
| pub protocol: u8, | |
| /// Overrides the [`SessionOptions::crypto_tags_to_send`] I2CP option. | |
| /// | |
| /// Defaults to `0`. | |
| pub send_tags: usize, | |
| /// Overrides the [`SessionOptions::crypto_low_tag_threshold`] I2CP option. | |
| /// | |
| /// Defaults to `0`. | |
| pub tag_threshold: usize, | |
| /// Overrides the [`SessionOptions::should_bundle_reply_info`] I2CP option. | |
| /// | |
| /// Defaults to `true`. | |
| pub send_lease_set: bool, | |
| } |
| options.to_port, | ||
| options.send_tags, | ||
| options.tag_threshold, | ||
| options.send_leaseset, |
Member
There was a problem hiding this comment.
Suggested change
| options.send_leaseset, | |
| options.send_lease_set, |
| options.protocol, | ||
| options.send_tags, | ||
| options.tag_threshold, | ||
| options.send_leaseset, |
Member
There was a problem hiding this comment.
Suggested change
| options.send_leaseset, | |
| options.send_lease_set, |
| options.protocol, | ||
| options.send_tags, | ||
| options.tag_threshold, | ||
| options.send_leaseset, |
Member
There was a problem hiding this comment.
Suggested change
| options.send_leaseset, | |
| options.send_lease_set, |
| options.to_port, | ||
| options.send_tags, | ||
| options.tag_threshold, | ||
| options.send_leaseset, |
Member
There was a problem hiding this comment.
Suggested change
| options.send_leaseset, | |
| options.send_lease_set, |
altonen
reviewed
Jul 27, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Aims at closing #9
I wrote 2 new doctests for the asynchronous module, but I had to set the root options.rs file to public in order to use
DatagramOptions.Is it an issue ?
Feel free to tear those doctests if so.