rust学习
HardRedStone
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Rust Rpc框架
框架仓库 https://github.com/paritytech/jsonrpc#readme 使用 1.依赖 [dependencies] jsonrpc-core = "18.0.0" jsonrpc-core-client = "18.0.0" jsonrpc-http-server = "18.0.0" jsonrpc-ipc-server = "18.0.0" jsonrpc-tcp-server= "18.0.0" jsonrpc-ws-server = "18.0.0" js原创 2022-01-13 14:47:33 · 1241 阅读 · 0 评论 -
Rust 刷leetcode 第二题
题目描述 力扣 // Definition for singly-linked list. #[derive(PartialEq, Eq, Clone, Debug)] pub struct ListNode { pub val: i32, pub next: Option<Box<ListNode>>, } struct Solution {} impl Solution { pub fn add_two_numbers( l1原创 2022-01-07 14:26:41 · 438 阅读 · 1 评论 -
Rust中如何获取时间戳
不需要引入第三方依赖,直接用系统自带的库。 use std::time::{SystemTime, UNIX_EPOCH}; match SystemTime::now().duration_since(UNIX_EPOCH) { Ok(n) => println!("1970-01-01 00:00:00 UTC was {} seconds ago!", n.as_secs()), Err(_) => panic!("SystemTime before UNIX E原创 2021-12-31 10:56:08 · 3938 阅读 · 0 评论
分享