Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom request prefix option #604

Merged
merged 2 commits into from
Aug 11, 2022
Merged

Conversation

Jarema
Copy link
Member

@Jarema Jarema commented Aug 10, 2022

fixes #602

Signed-off-by: Tomasz Pietrek [email protected]

Signed-off-by: Tomasz Pietrek <[email protected]>
@Jarema Jarema requested a review from caspervonb August 10, 2022 07:01
/// # Ok(())
/// # }
/// ```
pub fn inbox_prefix<T: ToString>(mut self, prefix: T) -> ConnectOptions {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caspervonb for options, maybe it's the best interface to use?

Explicitly states it will convert to owned String and yet allows for using &str.

/// # Ok(())
/// # }
/// ```
pub fn inbox_prefix<T: ToString>(mut self, prefix: T) -> ConnectOptions {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshedding:

Suggested change
pub fn inbox_prefix<T: ToString>(mut self, prefix: T) -> ConnectOptions {
pub fn inbox_with_prefix<T: ToString>(mut self, prefix: T) -> ConnectOptions {

Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Jarema Jarema merged commit 89ffd51 into main Aug 11, 2022
@Jarema Jarema deleted the jarema/add-custom-prefix-option branch August 11, 2022 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Async NATS client does not support inbox prefix (and should)
2 participants