Skip to content

API Notes

Will Duquette edited this page Sep 21, 2019 · 1 revision

API Notes

Notes on Molt's Rust API, from reading the Rust API guidelines. Things I need to make sure are true.

Miscellaneous Things to change

molt::types

  • The public types should be pub used in the main package.
  • Documentation needs to be fleshed out.
  • Internal tests need to be fleshed out in general

Other Notes

Method Names

  • as, to, and into, and extensions of these, are conversions of the struct into something else.
  • Getters do not use get_ as a prefix; prefer name() to get_name().
    • If the struct has only one thing to get, get() is acceptable.

Standard Traits

  • Where possible, implement Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Display, Default.
Clone this wiki locally