-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Description
I am enquiring if it is possible to currently use ToJava or any other means to map a Rust variant enum to a Java enum. In the examples I see a rust enum being mapped to differing java classes using ToRust but 1-1 to a java enum.
For example I am looking to achieve the following:
Java
public enum ClassificationIdKey {
A,
B,
C
}
Rust
This code could be easily updated in whatever means to represent the java enum
#[derive(duchess::toJava)]
pub enum ClassificationIdKey {
A,
B,
C
}
When attempting this conversion it asks me to define the java.class name for each enum value.
If this is not possible, is is possible to allow you to implement the ToJava trait yourself, to set how the value is translated ? I am asking here as https://duchess-rs.github.io/duchess/derive.html points to a empty file.
Metadata
Metadata
Assignees
Labels
No labels