I agree with the sentiment but …
then nothing can be bricked because on paper you can desolder the rom chip and put another one in place.
Companies already put serial numbers in components and configure them so only specific ones work together, requiring OEM tools to pair them.
It’s imaginable that someone makes something similar with e-fuzes instead.
The
fn(T)->R
syntax works for functions without associated data, it discards details of the implementation and works like function pointers in C. This allows them to be copy and 'static.The other function types can have data with them and have more type information at compile time which allows them to be inlined.
These functions each have their own unwritable type that implements the function traits (
Fn(T)->R
,FnMut(T)->R
andFnOnce(T)->R
) depending on their enclosed data.I hope I remembered everything right from this video by Jon Gjengset.