1.0 checklist
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
# Rust API Guidelines Checklist
- **Naming** *(crate aligns with Rust naming conventions)*
- [ ] Casing conforms to RFC 430 ([C-CASE])
- [ ] Ad-hoc conversions follow `as_`, `to_`, `into_` conventions ([C-CONV])
- [ ] Getter names follow Rust convention ([C-GETTER])
- [x] Methods on collections that produce iterators follow `iter`, `iter_mut`, `into_iter` ([C-ITER])
- [x] Iterator type names match the methods that produce them ([C-ITER-TY])
- [ ] Feature names are free of placeholder words ([C-FEATURE])
- [ ] Names use a consistent word order ([C-WORD-ORDER])
- **Interoperability** *(crate interacts nicely with other library functionality)*
- [ ] Types eagerly implement common traits ([C-COMMON-TRAITS])
- `Copy`, `Clone`, `Eq`, `PartialEq`, `Ord`, `PartialOrd`, `Hash`, `Debug`,
`Display`, `Default`
- [ ] Conversions use the standard traits `From`, `AsRef`, `AsMut` ([C-CONV-TRAITS])
- [x] Collections implement `FromIterator` and `Extend` ([C-COLLECT])
- [ ] Data structures implement Serde's `Serialize`, `Deserialize` ([C-SERDE])
- [ ] Types are `Send` and `Sync` where possible ([C-SEND-SYNC])
- [x] Error types are meaningful and well-behaved ([C-GOOD-ERR])
- [ ] Binary number types provide `Hex`, `Octal`, `Binary` formatting ([C-NUM-FMT])
- [x] Generic reader/writer functions take `R: Read` and `W: Write` by value ([C-RW-VALUE])
- **Macros** *(crate presents well-behaved macros)*
- [x] Input syntax is evocative of the output ([C-EVOCATIVE])
- [x] Macros compose well with attributes ([C-MACRO-ATTR])
- [x] Item macros work anywhere that items are allowed ([C-ANYWHERE])
- [x] Item macros support visibility specifiers ([C-MACRO-VIS])
- [x] Type fragments are flexible ([C-MACRO-TY])
- **Documentation** *(crate is abundantly documented)*
- [ ] Crate level docs are thorough and include examples ([C-CRATE-DOC])
- [ ] All items have a rustdoc example ([C-EXAMPLE])
- [ ] Examples use `?`, not `try!`, not `unwrap` ([C-QUESTION-MARK])
- [ ] Function docs include error, panic, and safety considerations ([C-FAILURE])
- [ ] Prose contains hyperlinks to relevant things ([C-LINK])
- [ ] Cargo.toml includes all common metadata ([C-METADATA])
- authors, description, license, homepage, documentation, repository,
readme, keywords, categories
- [ ] Crate sets html_root_url attribute "https://docs.rs/CRATE/X.Y.Z" ([C-HTML-ROOT])
- [ ] Release notes document all significant changes ([C-RELNOTES])
- [ ] Rustdoc does not show unhelpful implementation details ([C-HIDDEN])
- **Predictability** *(crate enables legible code that acts how it looks)*
- [x] Smart pointers do not add inherent methods ([C-SMART-PTR])
- [ ] Conversions live on the most specific type involved ([C-CONV-SPECIFIC])
- [ ] Functions with a clear receiver are methods ([C-METHOD])
- [ ] Functions do not take out-parameters ([C-NO-OUT])
- [ ] Operator overloads are unsurprising ([C-OVERLOAD])
- [x] Only smart pointers implement `Deref` and `DerefMut` ([C-DEREF])
- [ ] Constructors are static, inherent methods ([C-CTOR])
- **Flexibility** *(crate supports diverse real-world use cases)*
- [ ] Functions expose intermediate results to avoid duplicate work ([C-INTERMEDIATE])
- [ ] Caller decides where to copy and place data ([C-CALLER-CONTROL])
- [ ] Functions minimize assumptions about parameters by using generics ([C-GENERIC])
- [x] Traits are object-safe if they may be useful as a trait object ([C-OBJECT])
- **Type safety** *(crate leverages the type system effectively)*
- [ ] Newtypes provide static distinctions ([C-NEWTYPE])
- [ ] Arguments convey meaning through types, not `bool` or `Option` ([C-CUSTOM-TYPE])
- [x] Types for a set of flags are `bitflags`, not enums ([C-BITFLAG])
- [x] Builders enable construction of complex values ([C-BUILDER])
- **Dependability** *(crate is unlikely to do the wrong thing)*
- [ ] Functions validate their arguments ([C-VALIDATE])
- [x] Destructors never fail ([C-DTOR-FAIL])
- [x] Destructors that may block have alternatives ([C-DTOR-BLOCK])
- **Debuggability** *(crate is conducive to easy debugging)*
- [ ] All public types implement `Debug` ([C-DEBUG])
- [ ] `Debug` representation is never empty ([C-DEBUG-NONEMPTY])
- **Future proofing** *(crate is free to improve without breaking users' code)*
- [x] Sealed traits protect against downstream implementations ([C-SEALED])
- [ ] Structs have private fields ([C-STRUCT-PRIVATE])
- [ ] Newtypes encapsulate implementation details ([C-NEWTYPE-HIDE])
- [ ] Data structures do not duplicate derived trait bounds ([C-STRUCT-BOUNDS])
- **Necessities** *(to whom they matter, they really matter)*
- [x] Public dependencies of a stable crate are stable ([C-STABLE])
- [x] Crate and its dependencies have a permissive license ([C-PERMISSIVE])
[C-CASE]: https://rust-lang-nursery.github.io/api-guidelines/naming.html#c-case
[C-CONV]: https://rust-lang-nursery.github.io/api-guidelines/naming.html#c-conv
[C-GETTER]: https://rust-lang-nursery.github.io/api-guidelines/naming.html#c-getter
[C-ITER]: https://rust-lang-nursery.github.io/api-guidelines/naming.html#c-iter
[C-ITER-TY]: https://rust-lang-nursery.github.io/api-guidelines/naming.html#c-iter-ty
[C-FEATURE]: https://rust-lang-nursery.github.io/api-guidelines/naming.html#c-feature
[C-WORD-ORDER]: https://rust-lang-nursery.github.io/api-guidelines/naming.html#c-word-order
[C-COMMON-TRAITS]: https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#c-common-traits
[C-CONV-TRAITS]: https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#c-conv-traits
[C-COLLECT]: https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#c-collect
[C-SERDE]: https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#c-serde
[C-SEND-SYNC]: https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#c-send-sync
[C-GOOD-ERR]: https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#c-good-err
[C-NUM-FMT]: https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#c-num-fmt
[C-RW-VALUE]: https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#c-rw-value
[C-EVOCATIVE]: https://rust-lang-nursery.github.io/api-guidelines/macros.html#c-evocative
[C-MACRO-ATTR]: https://rust-lang-nursery.github.io/api-guidelines/macros.html#c-macro-attr
[C-ANYWHERE]: https://rust-lang-nursery.github.io/api-guidelines/macros.html#c-anywhere
[C-MACRO-VIS]: https://rust-lang-nursery.github.io/api-guidelines/macros.html#c-macro-vis
[C-MACRO-TY]: https://rust-lang-nursery.github.io/api-guidelines/macros.html#c-macro-ty
[C-CRATE-DOC]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#c-crate-doc
[C-EXAMPLE]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#c-example
[C-QUESTION-MARK]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#c-question-mark
[C-FAILURE]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#c-failure
[C-LINK]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#c-link
[C-METADATA]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#c-metadata
[C-HTML-ROOT]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#c-html-root
[C-RELNOTES]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#c-relnotes
[C-HIDDEN]: https://rust-lang-nursery.github.io/api-guidelines/documentation.html#c-hidden
[C-SMART-PTR]: https://rust-lang-nursery.github.io/api-guidelines/predictability.html#c-smart-ptr
[C-CONV-SPECIFIC]: https://rust-lang-nursery.github.io/api-guidelines/predictability.html#c-conv-specific
[C-METHOD]: https://rust-lang-nursery.github.io/api-guidelines/predictability.html#c-method
[C-NO-OUT]: https://rust-lang-nursery.github.io/api-guidelines/predictability.html#c-no-out
[C-OVERLOAD]: https://rust-lang-nursery.github.io/api-guidelines/predictability.html#c-overload
[C-DEREF]: https://rust-lang-nursery.github.io/api-guidelines/predictability.html#c-deref
[C-CTOR]: https://rust-lang-nursery.github.io/api-guidelines/predictability.html#c-ctor
[C-INTERMEDIATE]: https://rust-lang-nursery.github.io/api-guidelines/flexibility.html#c-intermediate
[C-CALLER-CONTROL]: https://rust-lang-nursery.github.io/api-guidelines/flexibility.html#c-caller-control
[C-GENERIC]: https://rust-lang-nursery.github.io/api-guidelines/flexibility.html#c-generic
[C-OBJECT]: https://rust-lang-nursery.github.io/api-guidelines/flexibility.html#c-object
[C-NEWTYPE]: https://rust-lang-nursery.github.io/api-guidelines/type-safety.html#c-newtype
[C-CUSTOM-TYPE]: https://rust-lang-nursery.github.io/api-guidelines/type-safety.html#c-custom-type
[C-BITFLAG]: https://rust-lang-nursery.github.io/api-guidelines/type-safety.html#c-bitflag
[C-BUILDER]: https://rust-lang-nursery.github.io/api-guidelines/type-safety.html#c-builder
[C-VALIDATE]: https://rust-lang-nursery.github.io/api-guidelines/dependability.html#c-validate
[C-DTOR-FAIL]: https://rust-lang-nursery.github.io/api-guidelines/dependability.html#c-dtor-fail
[C-DTOR-BLOCK]: https://rust-lang-nursery.github.io/api-guidelines/dependability.html#c-dtor-block
[C-DEBUG]: https://rust-lang-nursery.github.io/api-guidelines/debuggability.html#c-debug
[C-DEBUG-NONEMPTY]: https://rust-lang-nursery.github.io/api-guidelines/debuggability.html#c-debug-nonempty
[C-SEALED]: https://rust-lang-nursery.github.io/api-guidelines/future-proofing.html#c-sealed
[C-STRUCT-PRIVATE]: https://rust-lang-nursery.github.io/api-guidelines/future-proofing.html#c-struct-private
[C-NEWTYPE-HIDE]: https://rust-lang-nursery.github.io/api-guidelines/future-proofing.html#c-newtype-hide
[C-STRUCT-BOUNDS]: https://rust-lang-nursery.github.io/api-guidelines/future-proofing.html#c-struct-bounds
[C-STABLE]: https://rust-lang-nursery.github.io/api-guidelines/necessities.html#c-stable
[C-PERMISSIVE]: https://rust-lang-nursery.github.io/api-guidelines/necessities.html#c-permissive
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.