摘要:
trait Select<T>{ fn select<'a>(self, slice:&'a Vec<T>)->Vec<&T>; } impl<T> Select<T> for usize { fn select<'a>(self, slice:&'a Vec<T>)->Vec<&T> { matc 阅读全文
posted @ 2022-07-16 23:41
CrossPython
阅读(20)
评论(0)
推荐(0)
摘要:
#[derive(Clone, Copy)] enum Args<'a> { Idx(usize), IdxList(&'a [usize]), } fn get_data<'a, T>(arr: &'a [T], idxs: Args<'a>) -> Vec<&'a T> { match idxs 阅读全文
posted @ 2022-07-16 17:54
CrossPython
阅读(67)
评论(0)
推荐(0)
摘要:
use std::any::Any; macro_rules! requests{ ( $($key:expr=> $value:expr);* $(;)? ) => { let mut url: Box<dyn Any> = Box::new(""); let mut method: Box<dy 阅读全文
posted @ 2022-07-16 15:26
CrossPython
阅读(131)
评论(0)
推荐(0)
摘要:
#[derive(Debug)] enum Cell{ s(String), f(f64), i(i64), b(bool) } #[derive(Debug)] struct Col{ title:String, data:Vec<Cell> } type DataFrame = Vec<Col> 阅读全文
posted @ 2022-07-16 11:54
CrossPython
阅读(10)
评论(0)
推荐(0)
浙公网安备 33010602011771号