This is intended to be a type of post where I do reviews about some projects, PRs or issues in GitHub and I jot down the topics I learned during the process. Sometimes they would be just guesses and other times new features or design patterns.
mapto more structs in
masterbranch before merging to
borsbot is triggered by a GitHub comment
constis because this enables
constvalues to use those
macro_rules!for several creation implementations.
repr(C)which is related with interoperability with C for FFI (Foreign Function Interface)
repr(C): mimics the layout strategy of C / C++
.intofunction can be used when implementing the
AsMuttrait requires the
.as_mutmethod, and is implemented by Box: Example
link-time optimization(recommended over adding
#[inline]), and then found these tips and tricks about optimizing Rust
newstatic function for the three dimensions
Pointstructs are moved to inside the macro, along with a new
mapcreation is required as
newwas already inside of the macro
FnMuttrait expects a function with a mutable reference. This is used as a type bound.
Addtrait (used indirectly for many of the structs): docs