rust analyzer
configunder .vscode/settings.json
Read articleTopic
10 notes filed under this topic.
configunder .vscode/settings.json
Read articleSend and Sync A type is Send if it is safe to send it to another thread. A type is Sync if it is safe to share between threads (T is Sync if and only if &T is Send). raw pointers are neithe…
Read articleiterator iter() Returns an iterator over the slice into_iter() Creates a consuming iterator, that is, one that moves each value out of the vector iter_mut() Returns an iterator that allows …
Read articleI/OI/O:在计算机中指Input/Output。由于程序和运行时数据是在内存中驻留,由cpu来执行,涉及到数据交换的地方,通常是磁盘、网卡等,就需要IO接口 I/O 模型 同步阻塞 当用户线程发起IO请求后,会进行系统调用(system call)来让内核(Kernel)进行IO操作(系统调用是用户空间和内核空间的一个通道); 此时…
Read articlereflecttrait objectRust provides dynamic dispatch through a feature called trait objects. Trait objects, like &Foo or Box, are normal values that store a value of any type that implements t…
Read articletokio-trace -> tracing contexts, multi threadscausality -structured diagnostics ( no grep) tracing is part of tokio, tokio not requied spans: a perido of time, entered and exitedevents: sin…
Read articleuseful cmd specifying dependencies specifying dependencies from crates.io specifying dependencies from other registries specifying dependencies form git repositories path dependencies platf…
Read articleref vs &ref annotates pattern bindings to make them borrow rather than move. It is not a part of the pattern as far as matching is concerned: it does not affect whether a value is matched, …
Read articletools cargo-editThis tool extends Cargo to allow you to add, remove, and upgrade dependencies by modifying your Cargo.toml file from the command line cargo whatfeatures ${crate} eg: cargo w…
Read articleformatted print reference syntax attributes memoryThe compiler will not rearrange the memory layout ptr
Read article