Comments (1)
API checklist
https://rust-lang.github.io/api-guidelines/checklist.html
https://raw.githubusercontent.com/rust-lang/api-guidelines/master/src/checklist.md
- Naming (crate aligns with Rust naming conventions)
- Casing conforms to RFC 430
- Ad-hoc conversions follow
as_
,to_
,into_
conventions - Getter names follow Rust convention
- Methods on collections that produce iterators follow
iter
,iter_mut
,into_iter
- Iterator type names match the methods that produce them
- Feature names are free of placeholder words
- Names use a consistent word order
- Interoperability (crate interacts nicely with other library functionality)
- Types eagerly implement common traits
Copy
,Clone
,Eq
,PartialEq
,Ord
,PartialOrd
,Hash
,Debug
,
Display
,Default
- Conversions use the standard traits
From
,AsRef
,AsMut
- Collections implement
FromIterator
andExtend
- Data structures implement Serde's
Serialize
,Deserialize
- Types are
Send
andSync
where possible - Error types are meaningful and well-behaved
- Binary number types provide
Hex
,Octal
,Binary
formatting - Generic reader/writer functions take
R: Read
andW: Write
by value
- Types eagerly implement common traits
- Macros (crate presents well-behaved macros)
- Input syntax is evocative of the output
- Macros compose well with attributes
- Item macros work anywhere that items are allowed
- Item macros support visibility specifiers
- Type fragments are flexible
- Documentation (crate is abundantly documented)
- Crate level docs are thorough and include examples
- All items have a rustdoc example
- Examples use
?
, nottry!
, notunwrap
- Function docs include error, panic, and safety considerations
- Prose contains hyperlinks to relevant things
- Cargo.toml includes all common metadata
- authors, description, license, homepage, documentation, repository,
keywords, categories
- authors, description, license, homepage, documentation, repository,
- Release notes document all significant changes
- Rustdoc does not show unhelpful implementation details
- Predictability (crate enables legible code that acts how it looks)
- Smart pointers do not add inherent methods
- Conversions live on the most specific type involved
- Functions with a clear receiver are methods
- Functions do not take out-parameters
- Operator overloads are unsurprising
- Only smart pointers implement
Deref
andDerefMut
- Constructors are static, inherent methods
- Flexibility (crate supports diverse real-world use cases)
- Functions expose intermediate results to avoid duplicate work
- Caller decides where to copy and place data
- Functions minimize assumptions about parameters by using generics
- Traits are object-safe if they may be useful as a trait object
- Type safety (crate leverages the type system effectively)
- Newtypes provide static distinctions
- Arguments convey meaning through types, not
bool
orOption
- Types for a set of flags are
bitflags
, not enums - Builders enable construction of complex values
- Dependability (crate is unlikely to do the wrong thing)
- Functions validate their arguments
- Destructors never fail
- Destructors that may block have alternatives
- Debuggability (crate is conducive to easy debugging)
- All public types implement
Debug
-
Debug
representation is never empty
- All public types implement
- Future proofing (crate is free to improve without breaking users' code)
- Sealed traits protect against downstream implementations
- Structs have private fields
- Newtypes encapsulate implementation details
- Data structures do not duplicate derived trait bounds
- Necessities (to whom they matter, they really matter)
- Public dependencies of a stable crate are stable
- Crate and its dependencies have a permissive license
from stm32wlxx-hal.
Related Issues (18)
- SPI reworks
- Integrate subghz types with `embeded_time`
- Implement InputPin from embedded_hal HOT 3
- Replace Level type with `embedded-hal`s `PinState`
- Include Example of UART/DMA usage HOT 3
- UART Clock frequency when selecting PClk returns HClk frequency
- can not build success HOT 3
- How to Establish a Continuous LPTIM Peripheral HOT 3
- LPUART type mismatch & some other issues about UART peripheral implementation HOT 4
- how to access i2c HOT 2
- compile HOT 4
- Lora P2P communication HOT 5
- Marking stm32wlxx_hal::subghz::SleepCfg as must_use HOT 1
- [Meta] probe issues HOT 3
- Tracking issue for features HOT 1
- Nitpicks
- Tracking issue for SubGHz commands
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stm32wlxx-hal.