Info about default values in docs

Hi, I'm new to Rust. In the docs of a crate, I wonder how I can see default values of a parameter?
For example, I create a serial port with this function
https://docs.rs/serialport/latest/serialport/fn.new.html
and would like to know what the default value for parity checking for this port is. In the docs of the function as well as the docs of the enum Parity itself
https://docs.rs/serialport/latest/serialport/enum.Parity.html
I cannot find any info about the default. Is it up to the author of the crate to provide this info?

Yes. Where this is done rather nicely IMO is actix_web::HttpServer, for example. Referring to the source in your case isn't too bad though.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.