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

deafult parameter values not documented #732

Closed
milyin opened this issue Feb 12, 2024 · 3 comments · Fixed by #774
Closed

deafult parameter values not documented #732

milyin opened this issue Feb 12, 2024 · 3 comments · Fixed by #774
Labels
documentation Improvements or additions to documentation

Comments

@milyin
Copy link
Contributor

milyin commented Feb 12, 2024

There are builder methods which sets various parameters of Publisher. Queryable, etc.
For example:

let publisher = session
    .declare_publisher("key/expression")
    .congestion_control(CongestionControl::Block)
    .priority(Priority::Data)
    .res()

Calling these methods is optional. It's unclear which are the default values for these parameters. The only way to know is to look into the source of Session::declare_publisher: https://docs.rs/zenoh/0.10.1-rc/src/zenoh/session.rs.html#614-629

This is wrong. The default values of Publisher options is part of Publisher's API and should be explicitly specified for it. Same thing for all other entities.

@milyin milyin added the release Part of the next release label Feb 12, 2024
@milyin milyin moved this to Backlog in Zenoh 1.0.0 release Feb 12, 2024
@milyin milyin removed the release Part of the next release label Feb 12, 2024
@Mallets
Copy link
Member

Mallets commented Feb 12, 2024

Default variants of enums (e.g. CongestionControl) are somehow not propagated in the docs.

An associated const DEFAULT is being added to all those types in https://github.com/eclipse-zenoh/zenoh/pull/729/files. By doing so, it will be clear what's the default value for all those parameters. Would that suffice?

@milyin
Copy link
Contributor Author

milyin commented Feb 14, 2024

Default variants of enums (e.g. CongestionControl) are somehow not propagated in the docs.

An associated const DEFAULT is being added to all those types in https://github.com/eclipse-zenoh/zenoh/pull/729/files. By doing so, it will be clear what's the default value for all those parameters. Would that suffice?

Yes, I think this solves the problem

@milyin milyin linked a pull request Mar 12, 2024 that will close this issue
@milyin milyin moved this from Backlog to In progress in Zenoh 1.0.0 release Mar 12, 2024
@milyin milyin moved this from In progress to In review in Zenoh 1.0.0 release Mar 12, 2024
@Mallets Mallets added the documentation Improvements or additions to documentation label Mar 14, 2024
@milyin
Copy link
Contributor Author

milyin commented May 28, 2024

@milyin milyin closed this as completed May 28, 2024
@github-project-automation github-project-automation bot moved this from In review to Done in Zenoh 1.0.0 release May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants