Rust for native business logic, Flutter for flexible and beautiful GUI
1.88k
stars
65
forks
source link
send_signal_to_dart() function in rust code isn't generated when message contains enum and oneof fields in .protofile #306
Closed
yeoupooh closed 6 months ago
Report
send_signal_to_dart() function isn't generated when message contains enum and oneof fields in .proto file
Steps to Reproduce
enum Kind { one = 0; two = 1; }
// [RINF:DART-SIGNAL] message SampleInput { Kind kind = 1; oneof oneof_input { string name = 2; int32 age = 3; } }
// [RINF:RUST-SIGNAL] message SampleOutput { Kind kind = 1; oneof oneof_input { string name = 2; int32 age = 3; } }
... impl SampleInput { pub fn get_dart_signal_receiver() -> Receiver<DartSignal> {
...
}
}
impl SampleOutput { pub fn send_signal_to_dart(&self, blob: Option<Vec>) {
send_rust_signal(
1,
self.encode_to_vec(),
blob
);
}
}
... impl SampleInput { pub fn get_dart_signal_receiver() -> Receiver<DartSignal> {
...
}
}
};
// [RINF:RUST-SIGNAL]