Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: mojo/public/rust/src/bindings/message.rs

Issue 2240003002: Rust: Polish off communication across Mojom interfaces (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Upload newest version of code gen Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/rust/src/bindings/macros.rs ('k') | mojo/public/rust/src/bindings/mojom.rs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/rust/src/bindings/message.rs
diff --git a/mojo/public/rust/src/bindings/message.rs b/mojo/public/rust/src/bindings/message.rs
index 0d9834db31a9126b2d6bb568a4b641fc8b1d7d66..d9cc4acdbedaeac85cc70cd8b4086a11e495bb50 100644
--- a/mojo/public/rust/src/bindings/message.rs
+++ b/mojo/public/rust/src/bindings/message.rs
@@ -25,7 +25,7 @@ pub struct MessageHeader {
pub version: u32,
pub name: u32,
pub flags: u32,
- request_id: u64,
+ pub request_id: u64,
}
impl MessageHeader {
@@ -38,11 +38,6 @@ impl MessageHeader {
request_id: 0,
}
}
-
- /// Set the request ID.
- pub fn set_request_id(&mut self, id: u64) {
- self.request_id = id;
- }
}
impl MojomPointer for MessageHeader {
@@ -65,7 +60,7 @@ impl MojomPointer for MessageHeader {
fn encode_value(self, encoder: &mut Encoder, context: Context) {
MojomEncodable::encode(self.name, encoder, context.clone());
MojomEncodable::encode(self.flags, encoder, context.clone());
- if self.flags != MESSAGE_HEADER_NO_FLAG {
+ if self.version > 0 {
MojomEncodable::encode(self.request_id, encoder, context.clone());
}
}
@@ -112,3 +107,4 @@ impl MojomEncodable for MessageHeader {
}
impl MojomStruct for MessageHeader {}
+
« no previous file with comments | « mojo/public/rust/src/bindings/macros.rs ('k') | mojo/public/rust/src/bindings/mojom.rs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698