Macros
CLAP
Using Clippy
Std...
Reading the pages .....traits defined, Enums, Structs .... and (generic) definitions of the trait for EXTERNAL types. That's why it's listed there, not in the page of those types.
Any .....using
intrinsics::type_id::<T>()
HashMap ...
!Sized
Generics parameters implicitly constrained to Sized
- iterators
-
Error handling
Option -> Result
std::Result
? expands to ..... return Err(From::from(e))
Defining new error types out of lower-level ones:
#[non_exhaustive]
thiserror ->
#[derive(Error)]
#[error("message")]
....#[from:] ...
and we can use derive_more::Error
Error trait enables the nesting:
- source()
- provide() default to None, but can be implemented
YT: A Simpler Way to See Results
Anyhow:
https://docs.rs/anyhow/latest/anyhow/index.html
Clarifying references with Claude.io:
https://doc.rust-lang.org/std/primitive.reference.html
Prompts:
Rust references implement all certain traits Copy, Clone etc ..... is it because those traits have only &self methods?
.....
Yes,true. Those specific Traits are implemented by the definition/semantics of References. What I meant is the other Traits which .... references having Deref... when implemented for T and containing only &self methods, are therefore implemented for &T. Or is there anything more profound on that?
Now I know: