這位寫C++的老兄想寫之前的Enumjava
fn pet(_: Animal::Whale) {}
fn pet(_: Animal::Dog) {}
// or somehow describe a trait that forces its implementors to impl specific enum variants; not allow them to impl the whole enum
trait Petter<T> {
fn pet(_: Animal::T);
}
rust的近似方案1服務器
struct Dog {}
struct Whale {}
enum Animal {
Dog(Dog),
Whale(Whale),
}
rust的近似方案2app
// given there is a trait Bar, and types A and B implement it:
enum Foo {
A(A),
B(B),
}
impl Bar for Foo {
fn bar(&self) {
match self {
A(a) => a.bar(),
B(b) => b.bar(),
}
}
}
impl From<A> for Foo {
fn from(a: A) -> Foo {
Foo::A(a)
}
}
有個庫enum_dispatch能夠達到類似的效果ide
#[enum_dispatch]
enum Foo {
A,
B,
}
Read more工具
在rust裡面創建 JvmBuilder 再調用 java 函數性能
Read moreui
只支援 x86_64 Linuxspa
Read morecode
Read moreorm
「臺灣」找外包 預算6萬人民幣 有興趣的人請寄 t1238142000@gmail.com ,要求Rust實現。
Read more
mononoke
Blender是一個免費的開源3D創做套件。該文做者曾經在Blender工做過,編寫過Python API。爲了探索Blender二進制文件格式並提供讀取和使用它們的工具,該文做者建立了一個Rust項目
Read More
rs_blender
基於Tui-rs實現。
rust-battop
SQIP 是基於SVG 的LQIO 方案,其可以用於生成可用的SVG格式。做者以前用Node.js中的SQIP包,可是不夠穩定,而後又打算用Rust從新實現,又不打算重頭編寫,因此找到了SQIP的Go綁定庫,想經過FFI在Rust中調用Go代碼。可是和Cgo打交道,性能不知道如何。
Read More
與清華,交大等鏡像不一樣的是,這個是專用的Rust倉庫鏡像,應該會更穩定。快來試試吧