這位寫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仓库镜像,应该会更稳定。快来试试吧