-
Notifications
You must be signed in to change notification settings - Fork 13
API Notes
Will Duquette edited this page Sep 21, 2019
·
1 revision
Notes on Molt's Rust API, from reading the Rust API guidelines. Things I need to make sure are true.
- 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
-
as
,to
, andinto
, and extensions of these, are conversions of the struct into something else. - Getters do not use
get_
as a prefix; prefername()
toget_name()
.- If the struct has only one thing to get,
get()
is acceptable.
- If the struct has only one thing to get,
- Where possible, implement Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Display, Default.