zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

deafult parameter values not documented

Open milyin opened this issue 6 months ago • 2 comments

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 avatar Feb 12 '24 12:02 milyin

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?

Mallets avatar Feb 12 '24 18:02 Mallets

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 avatar Feb 14 '24 10:02 milyin

Fixed in https://github.com/eclipse-zenoh/zenoh/pull/729/files

milyin avatar May 28 '24 11:05 milyin