| OLD | NEW |
| 1 //! This file was auto-generated by the Rust bindings generator. | 1 //! This file was auto-generated by the Rust bindings generator. |
| 2 #![allow(bad_style)] | 2 #![allow(bad_style)] |
| 3 #![allow(unused_imports)] | 3 #![allow(unused_imports)] |
| 4 #![allow(unused_variables)] | 4 #![allow(unused_variables)] |
| 5 #![allow(dead_code)] | 5 #![allow(dead_code)] |
| 6 | 6 |
| 7 use mojo::bindings::decoding; | 7 use mojo::bindings::decoding; |
| 8 use mojo::bindings::decoding::{Decoder, ValidationError}; | 8 use mojo::bindings::decoding::{Decoder, ValidationError}; |
| 9 use mojo::bindings::encoding; | 9 use mojo::bindings::encoding; |
| 10 use mojo::bindings::encoding::{Context, DataHeaderValue, DATA_HEADER_SIZE, Encod
er}; | 10 use mojo::bindings::encoding::{Context, DataHeaderValue, DATA_HEADER_SIZE, Encod
er}; |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 // Interfaces: | 886 // Interfaces: |
| 887 // --- InterfaceA --- | 887 // --- InterfaceA --- |
| 888 | 888 |
| 889 pub mod InterfaceA { | 889 pub mod InterfaceA { |
| 890 pub const SERVICE_NAME: &'static str = ""; | 890 pub const SERVICE_NAME: &'static str = ""; |
| 891 pub const VERSION: u32 = 0; | 891 pub const VERSION: u32 = 0; |
| 892 } | 892 } |
| 893 | 893 |
| 894 pub struct InterfaceAClient { | 894 pub struct InterfaceAClient { |
| 895 pipe: message_pipe::MessageEndpoint, | 895 pipe: message_pipe::MessageEndpoint, |
| 896 version: u32, |
| 896 } | 897 } |
| 897 | 898 |
| 898 impl InterfaceAClient { | 899 impl InterfaceAClient { |
| 899 pub fn new(pipe: message_pipe::MessageEndpoint) -> InterfaceAClient { | 900 pub fn new(pipe: message_pipe::MessageEndpoint) -> InterfaceAClient { |
| 900 InterfaceAClient { pipe: pipe } | 901 InterfaceAClient { |
| 902 pipe: pipe, |
| 903 version: InterfaceA::VERSION, |
| 904 } |
| 901 } | 905 } |
| 902 } | 906 pub fn with_version(pipe: message_pipe::MessageEndpoint, version: u32) -> In
terfaceAClient { |
| 903 | 907 InterfaceAClient { |
| 904 impl CastHandle for InterfaceAClient { | 908 pipe: pipe, |
| 905 unsafe fn from_untyped(handle: system::UntypedHandle) -> InterfaceAClient { | 909 version: version, |
| 906 InterfaceAClient { pipe: message_pipe::MessageEndpoint::from_untyped(han
dle) } | 910 } |
| 907 } | 911 } |
| 908 fn as_untyped(self) -> system::UntypedHandle { | |
| 909 self.pipe.as_untyped() | |
| 910 } | |
| 911 } | |
| 912 | |
| 913 impl MojomEncodable for InterfaceAClient { | |
| 914 impl_encodable_for_interface!(); | |
| 915 } | 912 } |
| 916 | 913 |
| 917 impl MojomInterface for InterfaceAClient { | 914 impl MojomInterface for InterfaceAClient { |
| 918 fn service_name() -> &'static str { | 915 fn service_name() -> &'static str { |
| 919 InterfaceA::SERVICE_NAME | 916 InterfaceA::SERVICE_NAME |
| 920 } | 917 } |
| 921 fn version() -> u32 { | 918 fn version(&self) -> u32 { |
| 922 InterfaceA::VERSION | 919 self.version |
| 923 } | 920 } |
| 924 fn pipe(&self) -> &message_pipe::MessageEndpoint { | 921 fn pipe(&self) -> &message_pipe::MessageEndpoint { |
| 925 &self.pipe | 922 &self.pipe |
| 926 } | 923 } |
| 927 fn unwrap(self) -> message_pipe::MessageEndpoint { | 924 fn unwrap(self) -> message_pipe::MessageEndpoint { |
| 928 self.pipe | 925 self.pipe |
| 929 } | 926 } |
| 930 } | 927 } |
| 931 | 928 |
| 929 impl CastHandle for InterfaceAClient { |
| 930 unsafe fn from_untyped(handle: system::UntypedHandle) -> InterfaceAClient { |
| 931 InterfaceAClient { |
| 932 pipe: message_pipe::MessageEndpoint::from_untyped(handle), |
| 933 version: 0, // Since we have no other information, assume its the ba
se |
| 934 } |
| 935 } |
| 936 fn as_untyped(self) -> system::UntypedHandle { |
| 937 self.pipe.as_untyped() |
| 938 } |
| 939 } |
| 940 |
| 941 impl MojomEncodable for InterfaceAClient { |
| 942 impl_encodable_for_interface!(); |
| 943 } |
| 944 |
| 932 impl<R: InterfaceARequest> MojomInterfaceSend<R> for InterfaceAClient {} | 945 impl<R: InterfaceARequest> MojomInterfaceSend<R> for InterfaceAClient {} |
| 933 impl MojomInterfaceRecv for InterfaceAClient { | 946 impl MojomInterfaceRecv for InterfaceAClient { |
| 934 type Container = InterfaceAResponseOption; | 947 type Container = InterfaceAResponseOption; |
| 935 } | 948 } |
| 936 | 949 |
| 937 pub struct InterfaceAServer { | 950 pub struct InterfaceAServer { |
| 938 pipe: message_pipe::MessageEndpoint, | 951 pipe: message_pipe::MessageEndpoint, |
| 952 version: u32, |
| 939 } | 953 } |
| 940 | 954 |
| 941 impl InterfaceAServer { | 955 impl InterfaceAServer { |
| 942 pub fn new(pipe: message_pipe::MessageEndpoint) -> InterfaceAServer { | 956 pub fn new(pipe: message_pipe::MessageEndpoint) -> InterfaceAServer { |
| 943 InterfaceAServer { pipe: pipe } | 957 InterfaceAServer { |
| 958 pipe: pipe, |
| 959 version: InterfaceA::VERSION, |
| 960 } |
| 944 } | 961 } |
| 945 } | 962 pub fn with_version(pipe: message_pipe::MessageEndpoint, version: u32) -> In
terfaceAServer { |
| 946 | 963 InterfaceAServer { |
| 947 impl CastHandle for InterfaceAServer { | 964 pipe: pipe, |
| 948 unsafe fn from_untyped(handle: system::UntypedHandle) -> InterfaceAServer { | 965 version: version, |
| 949 InterfaceAServer { pipe: message_pipe::MessageEndpoint::from_untyped(han
dle) } | 966 } |
| 950 } | 967 } |
| 951 fn as_untyped(self) -> system::UntypedHandle { | |
| 952 self.pipe.as_untyped() | |
| 953 } | |
| 954 } | |
| 955 | |
| 956 impl MojomEncodable for InterfaceAServer { | |
| 957 impl_encodable_for_interface!(); | |
| 958 } | 968 } |
| 959 | 969 |
| 960 impl MojomInterface for InterfaceAServer { | 970 impl MojomInterface for InterfaceAServer { |
| 961 fn service_name() -> &'static str { | 971 fn service_name() -> &'static str { |
| 962 InterfaceA::SERVICE_NAME | 972 InterfaceA::SERVICE_NAME |
| 963 } | 973 } |
| 964 fn version() -> u32 { | 974 fn version(&self) -> u32 { |
| 965 InterfaceA::VERSION | 975 self.version |
| 966 } | 976 } |
| 967 fn pipe(&self) -> &message_pipe::MessageEndpoint { | 977 fn pipe(&self) -> &message_pipe::MessageEndpoint { |
| 968 &self.pipe | 978 &self.pipe |
| 969 } | 979 } |
| 970 fn unwrap(self) -> message_pipe::MessageEndpoint { | 980 fn unwrap(self) -> message_pipe::MessageEndpoint { |
| 971 self.pipe | 981 self.pipe |
| 972 } | 982 } |
| 973 } | 983 } |
| 974 | 984 |
| 985 impl CastHandle for InterfaceAServer { |
| 986 unsafe fn from_untyped(handle: system::UntypedHandle) -> InterfaceAServer { |
| 987 InterfaceAServer { |
| 988 pipe: message_pipe::MessageEndpoint::from_untyped(handle), |
| 989 version: 0, // Since we have no other information, assume its the ba
se |
| 990 } |
| 991 } |
| 992 fn as_untyped(self) -> system::UntypedHandle { |
| 993 self.pipe.as_untyped() |
| 994 } |
| 995 } |
| 996 |
| 997 impl MojomEncodable for InterfaceAServer { |
| 998 impl_encodable_for_interface!(); |
| 999 } |
| 1000 |
| 975 impl<R: InterfaceAResponse> MojomInterfaceSend<R> for InterfaceAServer {} | 1001 impl<R: InterfaceAResponse> MojomInterfaceSend<R> for InterfaceAServer {} |
| 976 impl MojomInterfaceRecv for InterfaceAServer { | 1002 impl MojomInterfaceRecv for InterfaceAServer { |
| 977 type Container = InterfaceARequestOption; | 1003 type Container = InterfaceARequestOption; |
| 978 } | 1004 } |
| 979 | 1005 |
| 980 // Enums | 1006 // Enums |
| 981 | 1007 |
| 982 | 1008 |
| 983 // Constants | 1009 // Constants |
| 984 | 1010 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 | 1048 |
| 1023 // --- BoundsCheckTestInterface --- | 1049 // --- BoundsCheckTestInterface --- |
| 1024 | 1050 |
| 1025 pub mod BoundsCheckTestInterface { | 1051 pub mod BoundsCheckTestInterface { |
| 1026 pub const SERVICE_NAME: &'static str = "this.is.the.service.name.for.BoundsC
heckTestInterface"; | 1052 pub const SERVICE_NAME: &'static str = "this.is.the.service.name.for.BoundsC
heckTestInterface"; |
| 1027 pub const VERSION: u32 = 0; | 1053 pub const VERSION: u32 = 0; |
| 1028 } | 1054 } |
| 1029 | 1055 |
| 1030 pub struct BoundsCheckTestInterfaceClient { | 1056 pub struct BoundsCheckTestInterfaceClient { |
| 1031 pipe: message_pipe::MessageEndpoint, | 1057 pipe: message_pipe::MessageEndpoint, |
| 1058 version: u32, |
| 1032 } | 1059 } |
| 1033 | 1060 |
| 1034 impl BoundsCheckTestInterfaceClient { | 1061 impl BoundsCheckTestInterfaceClient { |
| 1035 pub fn new(pipe: message_pipe::MessageEndpoint) -> BoundsCheckTestInterfaceC
lient { | 1062 pub fn new(pipe: message_pipe::MessageEndpoint) -> BoundsCheckTestInterfaceC
lient { |
| 1036 BoundsCheckTestInterfaceClient { pipe: pipe } | 1063 BoundsCheckTestInterfaceClient { |
| 1064 pipe: pipe, |
| 1065 version: BoundsCheckTestInterface::VERSION, |
| 1066 } |
| 1037 } | 1067 } |
| 1038 } | 1068 pub fn with_version(pipe: message_pipe::MessageEndpoint, |
| 1039 | 1069 version: u32) |
| 1040 impl CastHandle for BoundsCheckTestInterfaceClient { | 1070 -> BoundsCheckTestInterfaceClient { |
| 1041 unsafe fn from_untyped(handle: system::UntypedHandle) -> BoundsCheckTestInte
rfaceClient { | 1071 BoundsCheckTestInterfaceClient { |
| 1042 BoundsCheckTestInterfaceClient { pipe: message_pipe::MessageEndpoint::fr
om_untyped(handle) } | 1072 pipe: pipe, |
| 1073 version: version, |
| 1074 } |
| 1043 } | 1075 } |
| 1044 fn as_untyped(self) -> system::UntypedHandle { | |
| 1045 self.pipe.as_untyped() | |
| 1046 } | |
| 1047 } | |
| 1048 | |
| 1049 impl MojomEncodable for BoundsCheckTestInterfaceClient { | |
| 1050 impl_encodable_for_interface!(); | |
| 1051 } | 1076 } |
| 1052 | 1077 |
| 1053 impl MojomInterface for BoundsCheckTestInterfaceClient { | 1078 impl MojomInterface for BoundsCheckTestInterfaceClient { |
| 1054 fn service_name() -> &'static str { | 1079 fn service_name() -> &'static str { |
| 1055 BoundsCheckTestInterface::SERVICE_NAME | 1080 BoundsCheckTestInterface::SERVICE_NAME |
| 1056 } | 1081 } |
| 1057 fn version() -> u32 { | 1082 fn version(&self) -> u32 { |
| 1058 BoundsCheckTestInterface::VERSION | 1083 self.version |
| 1059 } | 1084 } |
| 1060 fn pipe(&self) -> &message_pipe::MessageEndpoint { | 1085 fn pipe(&self) -> &message_pipe::MessageEndpoint { |
| 1061 &self.pipe | 1086 &self.pipe |
| 1062 } | 1087 } |
| 1063 fn unwrap(self) -> message_pipe::MessageEndpoint { | 1088 fn unwrap(self) -> message_pipe::MessageEndpoint { |
| 1064 self.pipe | 1089 self.pipe |
| 1065 } | 1090 } |
| 1066 } | 1091 } |
| 1067 | 1092 |
| 1093 impl CastHandle for BoundsCheckTestInterfaceClient { |
| 1094 unsafe fn from_untyped(handle: system::UntypedHandle) -> BoundsCheckTestInte
rfaceClient { |
| 1095 BoundsCheckTestInterfaceClient { |
| 1096 pipe: message_pipe::MessageEndpoint::from_untyped(handle), |
| 1097 version: 0, // Since we have no other information, assume its the ba
se |
| 1098 } |
| 1099 } |
| 1100 fn as_untyped(self) -> system::UntypedHandle { |
| 1101 self.pipe.as_untyped() |
| 1102 } |
| 1103 } |
| 1104 |
| 1105 impl MojomEncodable for BoundsCheckTestInterfaceClient { |
| 1106 impl_encodable_for_interface!(); |
| 1107 } |
| 1108 |
| 1068 impl<R: BoundsCheckTestInterfaceRequest> MojomInterfaceSend<R> for BoundsCheckTe
stInterfaceClient {} | 1109 impl<R: BoundsCheckTestInterfaceRequest> MojomInterfaceSend<R> for BoundsCheckTe
stInterfaceClient {} |
| 1069 impl MojomInterfaceRecv for BoundsCheckTestInterfaceClient { | 1110 impl MojomInterfaceRecv for BoundsCheckTestInterfaceClient { |
| 1070 type Container = BoundsCheckTestInterfaceResponseOption; | 1111 type Container = BoundsCheckTestInterfaceResponseOption; |
| 1071 } | 1112 } |
| 1072 | 1113 |
| 1073 pub struct BoundsCheckTestInterfaceServer { | 1114 pub struct BoundsCheckTestInterfaceServer { |
| 1074 pipe: message_pipe::MessageEndpoint, | 1115 pipe: message_pipe::MessageEndpoint, |
| 1116 version: u32, |
| 1075 } | 1117 } |
| 1076 | 1118 |
| 1077 impl BoundsCheckTestInterfaceServer { | 1119 impl BoundsCheckTestInterfaceServer { |
| 1078 pub fn new(pipe: message_pipe::MessageEndpoint) -> BoundsCheckTestInterfaceS
erver { | 1120 pub fn new(pipe: message_pipe::MessageEndpoint) -> BoundsCheckTestInterfaceS
erver { |
| 1079 BoundsCheckTestInterfaceServer { pipe: pipe } | 1121 BoundsCheckTestInterfaceServer { |
| 1122 pipe: pipe, |
| 1123 version: BoundsCheckTestInterface::VERSION, |
| 1124 } |
| 1080 } | 1125 } |
| 1081 } | 1126 pub fn with_version(pipe: message_pipe::MessageEndpoint, |
| 1082 | 1127 version: u32) |
| 1083 impl CastHandle for BoundsCheckTestInterfaceServer { | 1128 -> BoundsCheckTestInterfaceServer { |
| 1084 unsafe fn from_untyped(handle: system::UntypedHandle) -> BoundsCheckTestInte
rfaceServer { | 1129 BoundsCheckTestInterfaceServer { |
| 1085 BoundsCheckTestInterfaceServer { pipe: message_pipe::MessageEndpoint::fr
om_untyped(handle) } | 1130 pipe: pipe, |
| 1131 version: version, |
| 1132 } |
| 1086 } | 1133 } |
| 1087 fn as_untyped(self) -> system::UntypedHandle { | |
| 1088 self.pipe.as_untyped() | |
| 1089 } | |
| 1090 } | |
| 1091 | |
| 1092 impl MojomEncodable for BoundsCheckTestInterfaceServer { | |
| 1093 impl_encodable_for_interface!(); | |
| 1094 } | 1134 } |
| 1095 | 1135 |
| 1096 impl MojomInterface for BoundsCheckTestInterfaceServer { | 1136 impl MojomInterface for BoundsCheckTestInterfaceServer { |
| 1097 fn service_name() -> &'static str { | 1137 fn service_name() -> &'static str { |
| 1098 BoundsCheckTestInterface::SERVICE_NAME | 1138 BoundsCheckTestInterface::SERVICE_NAME |
| 1099 } | 1139 } |
| 1100 fn version() -> u32 { | 1140 fn version(&self) -> u32 { |
| 1101 BoundsCheckTestInterface::VERSION | 1141 self.version |
| 1102 } | 1142 } |
| 1103 fn pipe(&self) -> &message_pipe::MessageEndpoint { | 1143 fn pipe(&self) -> &message_pipe::MessageEndpoint { |
| 1104 &self.pipe | 1144 &self.pipe |
| 1105 } | 1145 } |
| 1106 fn unwrap(self) -> message_pipe::MessageEndpoint { | 1146 fn unwrap(self) -> message_pipe::MessageEndpoint { |
| 1107 self.pipe | 1147 self.pipe |
| 1108 } | 1148 } |
| 1109 } | 1149 } |
| 1110 | 1150 |
| 1151 impl CastHandle for BoundsCheckTestInterfaceServer { |
| 1152 unsafe fn from_untyped(handle: system::UntypedHandle) -> BoundsCheckTestInte
rfaceServer { |
| 1153 BoundsCheckTestInterfaceServer { |
| 1154 pipe: message_pipe::MessageEndpoint::from_untyped(handle), |
| 1155 version: 0, // Since we have no other information, assume its the ba
se |
| 1156 } |
| 1157 } |
| 1158 fn as_untyped(self) -> system::UntypedHandle { |
| 1159 self.pipe.as_untyped() |
| 1160 } |
| 1161 } |
| 1162 |
| 1163 impl MojomEncodable for BoundsCheckTestInterfaceServer { |
| 1164 impl_encodable_for_interface!(); |
| 1165 } |
| 1166 |
| 1111 impl<R: BoundsCheckTestInterfaceResponse> MojomInterfaceSend<R> for BoundsCheckT
estInterfaceServer {} | 1167 impl<R: BoundsCheckTestInterfaceResponse> MojomInterfaceSend<R> for BoundsCheckT
estInterfaceServer {} |
| 1112 impl MojomInterfaceRecv for BoundsCheckTestInterfaceServer { | 1168 impl MojomInterfaceRecv for BoundsCheckTestInterfaceServer { |
| 1113 type Container = BoundsCheckTestInterfaceRequestOption; | 1169 type Container = BoundsCheckTestInterfaceRequestOption; |
| 1114 } | 1170 } |
| 1115 | 1171 |
| 1116 // Enums | 1172 // Enums |
| 1117 | 1173 |
| 1118 | 1174 |
| 1119 // Constants | 1175 // Constants |
| 1120 | 1176 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 impl MojomEncodable for BoundsCheckTestInterfaceMethod0Request { | 1283 impl MojomEncodable for BoundsCheckTestInterfaceMethod0Request { |
| 1228 impl_encodable_for_pointer!(); | 1284 impl_encodable_for_pointer!(); |
| 1229 fn compute_size(&self, context: Context) -> usize { | 1285 fn compute_size(&self, context: Context) -> usize { |
| 1230 encoding::align_default(self.serialized_size(&context)) + | 1286 encoding::align_default(self.serialized_size(&context)) + |
| 1231 self.param0.compute_size(context.clone()) | 1287 self.param0.compute_size(context.clone()) |
| 1232 } | 1288 } |
| 1233 } | 1289 } |
| 1234 | 1290 |
| 1235 impl MojomStruct for BoundsCheckTestInterfaceMethod0Request {} | 1291 impl MojomStruct for BoundsCheckTestInterfaceMethod0Request {} |
| 1236 impl MojomMessage for BoundsCheckTestInterfaceMethod0Request { | 1292 impl MojomMessage for BoundsCheckTestInterfaceMethod0Request { |
| 1293 fn min_version() -> u32 { |
| 1294 BoundsCheckTestInterfaceMethod0::MIN_VERSION |
| 1295 } |
| 1237 fn create_header() -> MessageHeader { | 1296 fn create_header() -> MessageHeader { |
| 1238 MessageHeader::new(BoundsCheckTestInterface::VERSION, | 1297 MessageHeader::new(1, |
| 1239 BoundsCheckTestInterfaceMethod0::ORDINAL, | 1298 BoundsCheckTestInterfaceMethod0::ORDINAL, |
| 1240 message::MESSAGE_HEADER_EXPECT_RESPONSE) | 1299 message::MESSAGE_HEADER_EXPECT_RESPONSE) |
| 1241 | 1300 |
| 1242 } | 1301 } |
| 1243 } | 1302 } |
| 1244 impl BoundsCheckTestInterfaceRequest for BoundsCheckTestInterfaceMethod0Request
{} | 1303 impl BoundsCheckTestInterfaceRequest for BoundsCheckTestInterfaceMethod0Request
{} |
| 1245 | 1304 |
| 1246 // -- BoundsCheckTestInterfaceMethod0Response -- | 1305 // -- BoundsCheckTestInterfaceMethod0Response -- |
| 1247 | 1306 |
| 1248 // Constants | 1307 // Constants |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 impl_encodable_for_pointer!(); | 1345 impl_encodable_for_pointer!(); |
| 1287 fn compute_size(&self, context: Context) -> usize { | 1346 fn compute_size(&self, context: Context) -> usize { |
| 1288 encoding::align_default(self.serialized_size(&context)) + | 1347 encoding::align_default(self.serialized_size(&context)) + |
| 1289 self.param0.compute_size(context.clone()) | 1348 self.param0.compute_size(context.clone()) |
| 1290 } | 1349 } |
| 1291 } | 1350 } |
| 1292 | 1351 |
| 1293 impl MojomStruct for BoundsCheckTestInterfaceMethod0Response {} | 1352 impl MojomStruct for BoundsCheckTestInterfaceMethod0Response {} |
| 1294 | 1353 |
| 1295 impl MojomMessage for BoundsCheckTestInterfaceMethod0Response { | 1354 impl MojomMessage for BoundsCheckTestInterfaceMethod0Response { |
| 1355 fn min_version() -> u32 { |
| 1356 BoundsCheckTestInterfaceMethod0::MIN_VERSION |
| 1357 } |
| 1296 fn create_header() -> MessageHeader { | 1358 fn create_header() -> MessageHeader { |
| 1297 MessageHeader::new(BoundsCheckTestInterface::VERSION, | 1359 MessageHeader::new(1, |
| 1298 BoundsCheckTestInterfaceMethod0::ORDINAL, | 1360 BoundsCheckTestInterfaceMethod0::ORDINAL, |
| 1299 message::MESSAGE_HEADER_IS_RESPONSE) | 1361 message::MESSAGE_HEADER_IS_RESPONSE) |
| 1300 } | 1362 } |
| 1301 } | 1363 } |
| 1302 impl BoundsCheckTestInterfaceResponse for BoundsCheckTestInterfaceMethod0Request
{} | 1364 impl BoundsCheckTestInterfaceResponse for BoundsCheckTestInterfaceMethod0Respons
e {} |
| 1303 /// Message: BoundsCheckTestInterfaceMethod1 | 1365 /// Message: BoundsCheckTestInterfaceMethod1 |
| 1304 pub mod BoundsCheckTestInterfaceMethod1 { | 1366 pub mod BoundsCheckTestInterfaceMethod1 { |
| 1305 pub const ORDINAL: u32 = 1; | 1367 pub const ORDINAL: u32 = 1; |
| 1306 pub const MIN_VERSION: u32 = 0; | 1368 pub const MIN_VERSION: u32 = 0; |
| 1307 } | 1369 } |
| 1308 // -- BoundsCheckTestInterfaceMethod1Request -- | 1370 // -- BoundsCheckTestInterfaceMethod1Request -- |
| 1309 | 1371 |
| 1310 // Constants | 1372 // Constants |
| 1311 // Enums | 1373 // Enums |
| 1312 // Struct version information | 1374 // Struct version information |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 impl MojomEncodable for BoundsCheckTestInterfaceMethod1Request { | 1409 impl MojomEncodable for BoundsCheckTestInterfaceMethod1Request { |
| 1348 impl_encodable_for_pointer!(); | 1410 impl_encodable_for_pointer!(); |
| 1349 fn compute_size(&self, context: Context) -> usize { | 1411 fn compute_size(&self, context: Context) -> usize { |
| 1350 encoding::align_default(self.serialized_size(&context)) + | 1412 encoding::align_default(self.serialized_size(&context)) + |
| 1351 self.param0.compute_size(context.clone()) | 1413 self.param0.compute_size(context.clone()) |
| 1352 } | 1414 } |
| 1353 } | 1415 } |
| 1354 | 1416 |
| 1355 impl MojomStruct for BoundsCheckTestInterfaceMethod1Request {} | 1417 impl MojomStruct for BoundsCheckTestInterfaceMethod1Request {} |
| 1356 impl MojomMessage for BoundsCheckTestInterfaceMethod1Request { | 1418 impl MojomMessage for BoundsCheckTestInterfaceMethod1Request { |
| 1419 fn min_version() -> u32 { |
| 1420 BoundsCheckTestInterfaceMethod1::MIN_VERSION |
| 1421 } |
| 1357 fn create_header() -> MessageHeader { | 1422 fn create_header() -> MessageHeader { |
| 1358 MessageHeader::new(BoundsCheckTestInterface::VERSION, | 1423 MessageHeader::new(0, |
| 1359 BoundsCheckTestInterfaceMethod1::ORDINAL, | 1424 BoundsCheckTestInterfaceMethod1::ORDINAL, |
| 1360 message::MESSAGE_HEADER_NO_FLAG) | 1425 message::MESSAGE_HEADER_NO_FLAG) |
| 1361 | 1426 |
| 1362 } | 1427 } |
| 1363 } | 1428 } |
| 1364 impl BoundsCheckTestInterfaceRequest for BoundsCheckTestInterfaceMethod1Request
{} | 1429 impl BoundsCheckTestInterfaceRequest for BoundsCheckTestInterfaceMethod1Request
{} |
| 1365 | 1430 |
| 1366 | 1431 |
| 1367 // --- ConformanceTestInterface --- | 1432 // --- ConformanceTestInterface --- |
| 1368 | 1433 |
| 1369 pub mod ConformanceTestInterface { | 1434 pub mod ConformanceTestInterface { |
| 1370 pub const SERVICE_NAME: &'static str = ""; | 1435 pub const SERVICE_NAME: &'static str = ""; |
| 1371 pub const VERSION: u32 = 0; | 1436 pub const VERSION: u32 = 0; |
| 1372 } | 1437 } |
| 1373 | 1438 |
| 1374 pub struct ConformanceTestInterfaceClient { | 1439 pub struct ConformanceTestInterfaceClient { |
| 1375 pipe: message_pipe::MessageEndpoint, | 1440 pipe: message_pipe::MessageEndpoint, |
| 1441 version: u32, |
| 1376 } | 1442 } |
| 1377 | 1443 |
| 1378 impl ConformanceTestInterfaceClient { | 1444 impl ConformanceTestInterfaceClient { |
| 1379 pub fn new(pipe: message_pipe::MessageEndpoint) -> ConformanceTestInterfaceC
lient { | 1445 pub fn new(pipe: message_pipe::MessageEndpoint) -> ConformanceTestInterfaceC
lient { |
| 1380 ConformanceTestInterfaceClient { pipe: pipe } | 1446 ConformanceTestInterfaceClient { |
| 1447 pipe: pipe, |
| 1448 version: ConformanceTestInterface::VERSION, |
| 1449 } |
| 1381 } | 1450 } |
| 1382 } | 1451 pub fn with_version(pipe: message_pipe::MessageEndpoint, |
| 1383 | 1452 version: u32) |
| 1384 impl CastHandle for ConformanceTestInterfaceClient { | 1453 -> ConformanceTestInterfaceClient { |
| 1385 unsafe fn from_untyped(handle: system::UntypedHandle) -> ConformanceTestInte
rfaceClient { | 1454 ConformanceTestInterfaceClient { |
| 1386 ConformanceTestInterfaceClient { pipe: message_pipe::MessageEndpoint::fr
om_untyped(handle) } | 1455 pipe: pipe, |
| 1456 version: version, |
| 1457 } |
| 1387 } | 1458 } |
| 1388 fn as_untyped(self) -> system::UntypedHandle { | |
| 1389 self.pipe.as_untyped() | |
| 1390 } | |
| 1391 } | |
| 1392 | |
| 1393 impl MojomEncodable for ConformanceTestInterfaceClient { | |
| 1394 impl_encodable_for_interface!(); | |
| 1395 } | 1459 } |
| 1396 | 1460 |
| 1397 impl MojomInterface for ConformanceTestInterfaceClient { | 1461 impl MojomInterface for ConformanceTestInterfaceClient { |
| 1398 fn service_name() -> &'static str { | 1462 fn service_name() -> &'static str { |
| 1399 ConformanceTestInterface::SERVICE_NAME | 1463 ConformanceTestInterface::SERVICE_NAME |
| 1400 } | 1464 } |
| 1401 fn version() -> u32 { | 1465 fn version(&self) -> u32 { |
| 1402 ConformanceTestInterface::VERSION | 1466 self.version |
| 1403 } | 1467 } |
| 1404 fn pipe(&self) -> &message_pipe::MessageEndpoint { | 1468 fn pipe(&self) -> &message_pipe::MessageEndpoint { |
| 1405 &self.pipe | 1469 &self.pipe |
| 1406 } | 1470 } |
| 1407 fn unwrap(self) -> message_pipe::MessageEndpoint { | 1471 fn unwrap(self) -> message_pipe::MessageEndpoint { |
| 1408 self.pipe | 1472 self.pipe |
| 1409 } | 1473 } |
| 1410 } | 1474 } |
| 1411 | 1475 |
| 1476 impl CastHandle for ConformanceTestInterfaceClient { |
| 1477 unsafe fn from_untyped(handle: system::UntypedHandle) -> ConformanceTestInte
rfaceClient { |
| 1478 ConformanceTestInterfaceClient { |
| 1479 pipe: message_pipe::MessageEndpoint::from_untyped(handle), |
| 1480 version: 0, // Since we have no other information, assume its the ba
se |
| 1481 } |
| 1482 } |
| 1483 fn as_untyped(self) -> system::UntypedHandle { |
| 1484 self.pipe.as_untyped() |
| 1485 } |
| 1486 } |
| 1487 |
| 1488 impl MojomEncodable for ConformanceTestInterfaceClient { |
| 1489 impl_encodable_for_interface!(); |
| 1490 } |
| 1491 |
| 1412 impl<R: ConformanceTestInterfaceRequest> MojomInterfaceSend<R> for ConformanceTe
stInterfaceClient {} | 1492 impl<R: ConformanceTestInterfaceRequest> MojomInterfaceSend<R> for ConformanceTe
stInterfaceClient {} |
| 1413 impl MojomInterfaceRecv for ConformanceTestInterfaceClient { | 1493 impl MojomInterfaceRecv for ConformanceTestInterfaceClient { |
| 1414 type Container = ConformanceTestInterfaceResponseOption; | 1494 type Container = ConformanceTestInterfaceResponseOption; |
| 1415 } | 1495 } |
| 1416 | 1496 |
| 1417 pub struct ConformanceTestInterfaceServer { | 1497 pub struct ConformanceTestInterfaceServer { |
| 1418 pipe: message_pipe::MessageEndpoint, | 1498 pipe: message_pipe::MessageEndpoint, |
| 1499 version: u32, |
| 1419 } | 1500 } |
| 1420 | 1501 |
| 1421 impl ConformanceTestInterfaceServer { | 1502 impl ConformanceTestInterfaceServer { |
| 1422 pub fn new(pipe: message_pipe::MessageEndpoint) -> ConformanceTestInterfaceS
erver { | 1503 pub fn new(pipe: message_pipe::MessageEndpoint) -> ConformanceTestInterfaceS
erver { |
| 1423 ConformanceTestInterfaceServer { pipe: pipe } | 1504 ConformanceTestInterfaceServer { |
| 1505 pipe: pipe, |
| 1506 version: ConformanceTestInterface::VERSION, |
| 1507 } |
| 1424 } | 1508 } |
| 1425 } | 1509 pub fn with_version(pipe: message_pipe::MessageEndpoint, |
| 1426 | 1510 version: u32) |
| 1427 impl CastHandle for ConformanceTestInterfaceServer { | 1511 -> ConformanceTestInterfaceServer { |
| 1428 unsafe fn from_untyped(handle: system::UntypedHandle) -> ConformanceTestInte
rfaceServer { | 1512 ConformanceTestInterfaceServer { |
| 1429 ConformanceTestInterfaceServer { pipe: message_pipe::MessageEndpoint::fr
om_untyped(handle) } | 1513 pipe: pipe, |
| 1514 version: version, |
| 1515 } |
| 1430 } | 1516 } |
| 1431 fn as_untyped(self) -> system::UntypedHandle { | |
| 1432 self.pipe.as_untyped() | |
| 1433 } | |
| 1434 } | |
| 1435 | |
| 1436 impl MojomEncodable for ConformanceTestInterfaceServer { | |
| 1437 impl_encodable_for_interface!(); | |
| 1438 } | 1517 } |
| 1439 | 1518 |
| 1440 impl MojomInterface for ConformanceTestInterfaceServer { | 1519 impl MojomInterface for ConformanceTestInterfaceServer { |
| 1441 fn service_name() -> &'static str { | 1520 fn service_name() -> &'static str { |
| 1442 ConformanceTestInterface::SERVICE_NAME | 1521 ConformanceTestInterface::SERVICE_NAME |
| 1443 } | 1522 } |
| 1444 fn version() -> u32 { | 1523 fn version(&self) -> u32 { |
| 1445 ConformanceTestInterface::VERSION | 1524 self.version |
| 1446 } | 1525 } |
| 1447 fn pipe(&self) -> &message_pipe::MessageEndpoint { | 1526 fn pipe(&self) -> &message_pipe::MessageEndpoint { |
| 1448 &self.pipe | 1527 &self.pipe |
| 1449 } | 1528 } |
| 1450 fn unwrap(self) -> message_pipe::MessageEndpoint { | 1529 fn unwrap(self) -> message_pipe::MessageEndpoint { |
| 1451 self.pipe | 1530 self.pipe |
| 1452 } | 1531 } |
| 1453 } | 1532 } |
| 1454 | 1533 |
| 1534 impl CastHandle for ConformanceTestInterfaceServer { |
| 1535 unsafe fn from_untyped(handle: system::UntypedHandle) -> ConformanceTestInte
rfaceServer { |
| 1536 ConformanceTestInterfaceServer { |
| 1537 pipe: message_pipe::MessageEndpoint::from_untyped(handle), |
| 1538 version: 0, // Since we have no other information, assume its the ba
se |
| 1539 } |
| 1540 } |
| 1541 fn as_untyped(self) -> system::UntypedHandle { |
| 1542 self.pipe.as_untyped() |
| 1543 } |
| 1544 } |
| 1545 |
| 1546 impl MojomEncodable for ConformanceTestInterfaceServer { |
| 1547 impl_encodable_for_interface!(); |
| 1548 } |
| 1549 |
| 1455 impl<R: ConformanceTestInterfaceResponse> MojomInterfaceSend<R> for ConformanceT
estInterfaceServer {} | 1550 impl<R: ConformanceTestInterfaceResponse> MojomInterfaceSend<R> for ConformanceT
estInterfaceServer {} |
| 1456 impl MojomInterfaceRecv for ConformanceTestInterfaceServer { | 1551 impl MojomInterfaceRecv for ConformanceTestInterfaceServer { |
| 1457 type Container = ConformanceTestInterfaceRequestOption; | 1552 type Container = ConformanceTestInterfaceRequestOption; |
| 1458 } | 1553 } |
| 1459 | 1554 |
| 1460 // Enums | 1555 // Enums |
| 1461 | 1556 |
| 1462 | 1557 |
| 1463 // Constants | 1558 // Constants |
| 1464 | 1559 |
| 1465 | 1560 |
| 1466 pub trait ConformanceTestInterfaceRequest: MojomMessage {} | 1561 pub trait ConformanceTestInterfaceRequest: MojomMessage {} |
| 1467 pub trait ConformanceTestInterfaceResponse: MojomMessage {} | 1562 pub trait ConformanceTestInterfaceResponse: MojomMessage {} |
| 1468 | 1563 |
| 1469 pub enum ConformanceTestInterfaceRequestOption { | 1564 pub enum ConformanceTestInterfaceRequestOption { |
| 1470 ConformanceTestInterfaceMethod2(ConformanceTestInterfaceMethod2Request), | |
| 1471 ConformanceTestInterfaceMethod3(ConformanceTestInterfaceMethod3Request), | 1565 ConformanceTestInterfaceMethod3(ConformanceTestInterfaceMethod3Request), |
| 1472 ConformanceTestInterfaceMethod4(ConformanceTestInterfaceMethod4Request), | 1566 ConformanceTestInterfaceMethod4(ConformanceTestInterfaceMethod4Request), |
| 1473 ConformanceTestInterfaceMethod5(ConformanceTestInterfaceMethod5Request), | 1567 ConformanceTestInterfaceMethod5(ConformanceTestInterfaceMethod5Request), |
| 1474 ConformanceTestInterfaceMethod10(ConformanceTestInterfaceMethod10Request), | |
| 1475 ConformanceTestInterfaceMethod6(ConformanceTestInterfaceMethod6Request), | |
| 1476 ConformanceTestInterfaceMethod7(ConformanceTestInterfaceMethod7Request), | 1568 ConformanceTestInterfaceMethod7(ConformanceTestInterfaceMethod7Request), |
| 1477 ConformanceTestInterfaceMethod8(ConformanceTestInterfaceMethod8Request), | |
| 1478 ConformanceTestInterfaceMethod9(ConformanceTestInterfaceMethod9Request), | |
| 1479 ConformanceTestInterfaceMethod11(ConformanceTestInterfaceMethod11Request), | |
| 1480 ConformanceTestInterfaceMethod12(ConformanceTestInterfaceMethod12Request), | 1569 ConformanceTestInterfaceMethod12(ConformanceTestInterfaceMethod12Request), |
| 1481 ConformanceTestInterfaceMethod14(ConformanceTestInterfaceMethod14Request), | 1570 ConformanceTestInterfaceMethod14(ConformanceTestInterfaceMethod14Request), |
| 1571 ConformanceTestInterfaceMethod15(ConformanceTestInterfaceMethod15Request), |
| 1572 ConformanceTestInterfaceMethod1(ConformanceTestInterfaceMethod1Request), |
| 1573 ConformanceTestInterfaceMethod2(ConformanceTestInterfaceMethod2Request), |
| 1574 ConformanceTestInterfaceMethod6(ConformanceTestInterfaceMethod6Request), |
| 1575 ConformanceTestInterfaceMethod8(ConformanceTestInterfaceMethod8Request), |
| 1576 ConformanceTestInterfaceMethod10(ConformanceTestInterfaceMethod10Request), |
| 1577 ConformanceTestInterfaceMethod11(ConformanceTestInterfaceMethod11Request), |
| 1482 ConformanceTestInterfaceMethod0(ConformanceTestInterfaceMethod0Request), | 1578 ConformanceTestInterfaceMethod0(ConformanceTestInterfaceMethod0Request), |
| 1483 ConformanceTestInterfaceMethod1(ConformanceTestInterfaceMethod1Request), | 1579 ConformanceTestInterfaceMethod9(ConformanceTestInterfaceMethod9Request), |
| 1484 ConformanceTestInterfaceMethod13(ConformanceTestInterfaceMethod13Request), | 1580 ConformanceTestInterfaceMethod13(ConformanceTestInterfaceMethod13Request), |
| 1485 ConformanceTestInterfaceMethod15(ConformanceTestInterfaceMethod15Request), | |
| 1486 } | 1581 } |
| 1487 | 1582 |
| 1488 impl MojomMessageOption for ConformanceTestInterfaceRequestOption { | 1583 impl MojomMessageOption for ConformanceTestInterfaceRequestOption { |
| 1489 fn decode_payload(header: MessageHeader, | 1584 fn decode_payload(header: MessageHeader, |
| 1490 buffer: &[u8], | 1585 buffer: &[u8], |
| 1491 handles: Vec<UntypedHandle>) | 1586 handles: Vec<UntypedHandle>) |
| 1492 -> Result<Self, ValidationError> { | 1587 -> Result<Self, ValidationError> { |
| 1493 match header.name { | 1588 match header.name { |
| 1494 ConformanceTestInterfaceMethod2::ORDINAL => { | |
| 1495 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | |
| 1496 return Err(ValidationError::MessageHeaderInvalidFlags); | |
| 1497 } | |
| 1498 match ConformanceTestInterfaceMethod2Request::deserialize(buffer
, handles) { | |
| 1499 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod2(value)), | |
| 1500 Err(err) => return Err(err), | |
| 1501 } | |
| 1502 } | |
| 1503 ConformanceTestInterfaceMethod3::ORDINAL => { | 1589 ConformanceTestInterfaceMethod3::ORDINAL => { |
| 1504 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | 1590 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1505 return Err(ValidationError::MessageHeaderInvalidFlags); | 1591 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1506 } | 1592 } |
| 1507 match ConformanceTestInterfaceMethod3Request::deserialize(buffer
, handles) { | 1593 match ConformanceTestInterfaceMethod3Request::deserialize(buffer
, handles) { |
| 1508 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod3(value)), | 1594 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod3(value)), |
| 1509 Err(err) => return Err(err), | 1595 Err(err) => return Err(err), |
| 1510 } | 1596 } |
| 1511 } | 1597 } |
| 1512 ConformanceTestInterfaceMethod4::ORDINAL => { | 1598 ConformanceTestInterfaceMethod4::ORDINAL => { |
| 1513 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | 1599 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1514 return Err(ValidationError::MessageHeaderInvalidFlags); | 1600 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1515 } | 1601 } |
| 1516 match ConformanceTestInterfaceMethod4Request::deserialize(buffer
, handles) { | 1602 match ConformanceTestInterfaceMethod4Request::deserialize(buffer
, handles) { |
| 1517 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod4(value)), | 1603 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod4(value)), |
| 1518 Err(err) => return Err(err), | 1604 Err(err) => return Err(err), |
| 1519 } | 1605 } |
| 1520 } | 1606 } |
| 1521 ConformanceTestInterfaceMethod5::ORDINAL => { | 1607 ConformanceTestInterfaceMethod5::ORDINAL => { |
| 1522 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | 1608 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1523 return Err(ValidationError::MessageHeaderInvalidFlags); | 1609 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1524 } | 1610 } |
| 1525 match ConformanceTestInterfaceMethod5Request::deserialize(buffer
, handles) { | 1611 match ConformanceTestInterfaceMethod5Request::deserialize(buffer
, handles) { |
| 1526 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod5(value)), | 1612 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod5(value)), |
| 1527 Err(err) => return Err(err), | 1613 Err(err) => return Err(err), |
| 1528 } | 1614 } |
| 1529 } | 1615 } |
| 1530 ConformanceTestInterfaceMethod10::ORDINAL => { | |
| 1531 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | |
| 1532 return Err(ValidationError::MessageHeaderInvalidFlags); | |
| 1533 } | |
| 1534 match ConformanceTestInterfaceMethod10Request::deserialize(buffe
r, handles) { | |
| 1535 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod10(value)), | |
| 1536 Err(err) => return Err(err), | |
| 1537 } | |
| 1538 } | |
| 1539 ConformanceTestInterfaceMethod6::ORDINAL => { | |
| 1540 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | |
| 1541 return Err(ValidationError::MessageHeaderInvalidFlags); | |
| 1542 } | |
| 1543 match ConformanceTestInterfaceMethod6Request::deserialize(buffer
, handles) { | |
| 1544 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod6(value)), | |
| 1545 Err(err) => return Err(err), | |
| 1546 } | |
| 1547 } | |
| 1548 ConformanceTestInterfaceMethod7::ORDINAL => { | 1616 ConformanceTestInterfaceMethod7::ORDINAL => { |
| 1549 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | 1617 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1550 return Err(ValidationError::MessageHeaderInvalidFlags); | 1618 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1551 } | 1619 } |
| 1552 match ConformanceTestInterfaceMethod7Request::deserialize(buffer
, handles) { | 1620 match ConformanceTestInterfaceMethod7Request::deserialize(buffer
, handles) { |
| 1553 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod7(value)), | 1621 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod7(value)), |
| 1554 Err(err) => return Err(err), | 1622 Err(err) => return Err(err), |
| 1555 } | 1623 } |
| 1556 } | 1624 } |
| 1557 ConformanceTestInterfaceMethod8::ORDINAL => { | |
| 1558 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | |
| 1559 return Err(ValidationError::MessageHeaderInvalidFlags); | |
| 1560 } | |
| 1561 match ConformanceTestInterfaceMethod8Request::deserialize(buffer
, handles) { | |
| 1562 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod8(value)), | |
| 1563 Err(err) => return Err(err), | |
| 1564 } | |
| 1565 } | |
| 1566 ConformanceTestInterfaceMethod9::ORDINAL => { | |
| 1567 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | |
| 1568 return Err(ValidationError::MessageHeaderInvalidFlags); | |
| 1569 } | |
| 1570 match ConformanceTestInterfaceMethod9Request::deserialize(buffer
, handles) { | |
| 1571 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod9(value)), | |
| 1572 Err(err) => return Err(err), | |
| 1573 } | |
| 1574 } | |
| 1575 ConformanceTestInterfaceMethod11::ORDINAL => { | |
| 1576 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | |
| 1577 return Err(ValidationError::MessageHeaderInvalidFlags); | |
| 1578 } | |
| 1579 match ConformanceTestInterfaceMethod11Request::deserialize(buffe
r, handles) { | |
| 1580 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod11(value)), | |
| 1581 Err(err) => return Err(err), | |
| 1582 } | |
| 1583 } | |
| 1584 ConformanceTestInterfaceMethod12::ORDINAL => { | 1625 ConformanceTestInterfaceMethod12::ORDINAL => { |
| 1585 if header.flags != message::MESSAGE_HEADER_EXPECT_RESPONSE { | 1626 if header.flags != message::MESSAGE_HEADER_EXPECT_RESPONSE { |
| 1586 return Err(ValidationError::MessageHeaderInvalidFlags); | 1627 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1587 } | 1628 } |
| 1588 match ConformanceTestInterfaceMethod12Request::deserialize(buffe
r, handles) { | 1629 match ConformanceTestInterfaceMethod12Request::deserialize(buffe
r, handles) { |
| 1589 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod12(value)), | 1630 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod12(value)), |
| 1590 Err(err) => return Err(err), | 1631 Err(err) => return Err(err), |
| 1591 } | 1632 } |
| 1592 } | 1633 } |
| 1593 ConformanceTestInterfaceMethod14::ORDINAL => { | 1634 ConformanceTestInterfaceMethod14::ORDINAL => { |
| 1594 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | 1635 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1595 return Err(ValidationError::MessageHeaderInvalidFlags); | 1636 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1596 } | 1637 } |
| 1597 match ConformanceTestInterfaceMethod14Request::deserialize(buffe
r, handles) { | 1638 match ConformanceTestInterfaceMethod14Request::deserialize(buffe
r, handles) { |
| 1598 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod14(value)), | 1639 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod14(value)), |
| 1599 Err(err) => return Err(err), | 1640 Err(err) => return Err(err), |
| 1600 } | 1641 } |
| 1601 } | 1642 } |
| 1602 ConformanceTestInterfaceMethod0::ORDINAL => { | 1643 ConformanceTestInterfaceMethod15::ORDINAL => { |
| 1603 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | 1644 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1604 return Err(ValidationError::MessageHeaderInvalidFlags); | 1645 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1605 } | 1646 } |
| 1606 match ConformanceTestInterfaceMethod0Request::deserialize(buffer
, handles) { | 1647 match ConformanceTestInterfaceMethod15Request::deserialize(buffe
r, handles) { |
| 1607 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod0(value)), | 1648 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod15(value)), |
| 1608 Err(err) => return Err(err), | 1649 Err(err) => return Err(err), |
| 1609 } | 1650 } |
| 1610 } | 1651 } |
| 1611 ConformanceTestInterfaceMethod1::ORDINAL => { | 1652 ConformanceTestInterfaceMethod1::ORDINAL => { |
| 1612 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | 1653 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1613 return Err(ValidationError::MessageHeaderInvalidFlags); | 1654 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1614 } | 1655 } |
| 1615 match ConformanceTestInterfaceMethod1Request::deserialize(buffer
, handles) { | 1656 match ConformanceTestInterfaceMethod1Request::deserialize(buffer
, handles) { |
| 1616 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod1(value)), | 1657 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod1(value)), |
| 1617 Err(err) => return Err(err), | 1658 Err(err) => return Err(err), |
| 1618 } | 1659 } |
| 1619 } | 1660 } |
| 1661 ConformanceTestInterfaceMethod2::ORDINAL => { |
| 1662 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1663 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1664 } |
| 1665 match ConformanceTestInterfaceMethod2Request::deserialize(buffer
, handles) { |
| 1666 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod2(value)), |
| 1667 Err(err) => return Err(err), |
| 1668 } |
| 1669 } |
| 1670 ConformanceTestInterfaceMethod6::ORDINAL => { |
| 1671 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1672 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1673 } |
| 1674 match ConformanceTestInterfaceMethod6Request::deserialize(buffer
, handles) { |
| 1675 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod6(value)), |
| 1676 Err(err) => return Err(err), |
| 1677 } |
| 1678 } |
| 1679 ConformanceTestInterfaceMethod8::ORDINAL => { |
| 1680 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1681 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1682 } |
| 1683 match ConformanceTestInterfaceMethod8Request::deserialize(buffer
, handles) { |
| 1684 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod8(value)), |
| 1685 Err(err) => return Err(err), |
| 1686 } |
| 1687 } |
| 1688 ConformanceTestInterfaceMethod10::ORDINAL => { |
| 1689 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1690 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1691 } |
| 1692 match ConformanceTestInterfaceMethod10Request::deserialize(buffe
r, handles) { |
| 1693 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod10(value)), |
| 1694 Err(err) => return Err(err), |
| 1695 } |
| 1696 } |
| 1697 ConformanceTestInterfaceMethod11::ORDINAL => { |
| 1698 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1699 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1700 } |
| 1701 match ConformanceTestInterfaceMethod11Request::deserialize(buffe
r, handles) { |
| 1702 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod11(value)), |
| 1703 Err(err) => return Err(err), |
| 1704 } |
| 1705 } |
| 1706 ConformanceTestInterfaceMethod0::ORDINAL => { |
| 1707 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1708 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1709 } |
| 1710 match ConformanceTestInterfaceMethod0Request::deserialize(buffer
, handles) { |
| 1711 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod0(value)), |
| 1712 Err(err) => return Err(err), |
| 1713 } |
| 1714 } |
| 1715 ConformanceTestInterfaceMethod9::ORDINAL => { |
| 1716 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1717 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1718 } |
| 1719 match ConformanceTestInterfaceMethod9Request::deserialize(buffer
, handles) { |
| 1720 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod9(value)), |
| 1721 Err(err) => return Err(err), |
| 1722 } |
| 1723 } |
| 1620 ConformanceTestInterfaceMethod13::ORDINAL => { | 1724 ConformanceTestInterfaceMethod13::ORDINAL => { |
| 1621 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | 1725 if header.flags != message::MESSAGE_HEADER_NO_FLAG { |
| 1622 return Err(ValidationError::MessageHeaderInvalidFlags); | 1726 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1623 } | 1727 } |
| 1624 match ConformanceTestInterfaceMethod13Request::deserialize(buffe
r, handles) { | 1728 match ConformanceTestInterfaceMethod13Request::deserialize(buffe
r, handles) { |
| 1625 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod13(value)), | 1729 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod13(value)), |
| 1626 Err(err) => return Err(err), | 1730 Err(err) => return Err(err), |
| 1627 } | 1731 } |
| 1628 } | 1732 } |
| 1629 ConformanceTestInterfaceMethod15::ORDINAL => { | |
| 1630 if header.flags != message::MESSAGE_HEADER_NO_FLAG { | |
| 1631 return Err(ValidationError::MessageHeaderInvalidFlags); | |
| 1632 } | |
| 1633 match ConformanceTestInterfaceMethod15Request::deserialize(buffe
r, handles) { | |
| 1634 Ok(value) => Ok(ConformanceTestInterfaceRequestOption::Confo
rmanceTestInterfaceMethod15(value)), | |
| 1635 Err(err) => return Err(err), | |
| 1636 } | |
| 1637 } | |
| 1638 _ => Err(ValidationError::MessageHeaderUnknownMethod), | 1733 _ => Err(ValidationError::MessageHeaderUnknownMethod), |
| 1639 } | 1734 } |
| 1640 } | 1735 } |
| 1641 } | 1736 } |
| 1642 | 1737 |
| 1643 pub enum ConformanceTestInterfaceResponseOption { | 1738 pub enum ConformanceTestInterfaceResponseOption { |
| 1644 ConformanceTestInterfaceMethod12(ConformanceTestInterfaceMethod12Response), | 1739 ConformanceTestInterfaceMethod12(ConformanceTestInterfaceMethod12Response), |
| 1645 } | 1740 } |
| 1646 | 1741 |
| 1647 impl MojomMessageOption for ConformanceTestInterfaceResponseOption { | 1742 impl MojomMessageOption for ConformanceTestInterfaceResponseOption { |
| 1648 fn decode_payload(header: MessageHeader, | 1743 fn decode_payload(header: MessageHeader, |
| 1649 buffer: &[u8], | 1744 buffer: &[u8], |
| 1650 handles: Vec<UntypedHandle>) | 1745 handles: Vec<UntypedHandle>) |
| 1651 -> Result<Self, ValidationError> { | 1746 -> Result<Self, ValidationError> { |
| 1652 if header.flags != message::MESSAGE_HEADER_IS_RESPONSE { | 1747 if header.flags != message::MESSAGE_HEADER_IS_RESPONSE { |
| 1653 return Err(ValidationError::MessageHeaderInvalidFlags); | 1748 return Err(ValidationError::MessageHeaderInvalidFlags); |
| 1654 } | 1749 } |
| 1655 match header.name { | 1750 match header.name { |
| 1656 ConformanceTestInterfaceMethod12::ORDINAL => { | 1751 ConformanceTestInterfaceMethod12::ORDINAL => { |
| 1657 match ConformanceTestInterfaceMethod12Response::deserialize(buff
er, handles) { | 1752 match ConformanceTestInterfaceMethod12Response::deserialize(buff
er, handles) { |
| 1658 Ok(value) => Ok(ConformanceTestInterfaceResponseOption::Conf
ormanceTestInterfaceMethod12(value)), | 1753 Ok(value) => Ok(ConformanceTestInterfaceResponseOption::Conf
ormanceTestInterfaceMethod12(value)), |
| 1659 Err(err) => return Err(err), | 1754 Err(err) => return Err(err), |
| 1660 } | 1755 } |
| 1661 } | 1756 } |
| 1662 _ => Err(ValidationError::MessageHeaderUnknownMethod), | 1757 _ => Err(ValidationError::MessageHeaderUnknownMethod), |
| 1663 } | 1758 } |
| 1664 } | 1759 } |
| 1665 } | 1760 } |
| 1666 | 1761 |
| 1667 /// Message: ConformanceTestInterfaceMethod2 | |
| 1668 pub mod ConformanceTestInterfaceMethod2 { | |
| 1669 pub const ORDINAL: u32 = 2; | |
| 1670 pub const MIN_VERSION: u32 = 0; | |
| 1671 } | |
| 1672 // -- ConformanceTestInterfaceMethod2Request -- | |
| 1673 | |
| 1674 // Constants | |
| 1675 // Enums | |
| 1676 // Struct version information | |
| 1677 const ConformanceTestInterfaceMethod2RequestVersions: [(u32, u32); 1] = [(0, 24)
]; | |
| 1678 | |
| 1679 // Struct definition | |
| 1680 pub struct ConformanceTestInterfaceMethod2Request { | |
| 1681 pub param0: StructB, | |
| 1682 pub param1: StructA, | |
| 1683 } | |
| 1684 | |
| 1685 impl MojomPointer for ConformanceTestInterfaceMethod2Request { | |
| 1686 fn header_data(&self) -> DataHeaderValue { | |
| 1687 DataHeaderValue::Version(0) | |
| 1688 } | |
| 1689 fn serialized_size(&self, _context: &Context) -> usize { | |
| 1690 24 | |
| 1691 } | |
| 1692 fn encode_value(self, encoder: &mut Encoder, context: Context) { | |
| 1693 MojomEncodable::encode(self.param0, encoder, context.clone()); | |
| 1694 MojomEncodable::encode(self.param1, encoder, context.clone()); | |
| 1695 | |
| 1696 } | |
| 1697 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | |
| 1698 let version = { | |
| 1699 let mut state = decoder.get_mut(&context); | |
| 1700 match state.decode_struct_header(&ConformanceTestInterfaceMethod2Req
uestVersions) { | |
| 1701 Ok(header) => header.data(), | |
| 1702 Err(err) => return Err(err), | |
| 1703 } | |
| 1704 }; | |
| 1705 let param0 = match <StructB>::decode(decoder, context.clone()) { | |
| 1706 Ok(value) => value, | |
| 1707 Err(err) => return Err(err), | |
| 1708 }; | |
| 1709 let param1 = match <StructA>::decode(decoder, context.clone()) { | |
| 1710 Ok(value) => value, | |
| 1711 Err(err) => return Err(err), | |
| 1712 }; | |
| 1713 Ok(ConformanceTestInterfaceMethod2Request { | |
| 1714 param0: param0, | |
| 1715 param1: param1, | |
| 1716 }) | |
| 1717 } | |
| 1718 } | |
| 1719 | |
| 1720 impl MojomEncodable for ConformanceTestInterfaceMethod2Request { | |
| 1721 impl_encodable_for_pointer!(); | |
| 1722 fn compute_size(&self, context: Context) -> usize { | |
| 1723 encoding::align_default(self.serialized_size(&context)) + | |
| 1724 self.param0.compute_size(context.clone()) + | |
| 1725 self.param1.compute_size(context.clone()) | |
| 1726 } | |
| 1727 } | |
| 1728 | |
| 1729 impl MojomStruct for ConformanceTestInterfaceMethod2Request {} | |
| 1730 impl MojomMessage for ConformanceTestInterfaceMethod2Request { | |
| 1731 fn create_header() -> MessageHeader { | |
| 1732 MessageHeader::new(ConformanceTestInterface::VERSION, | |
| 1733 ConformanceTestInterfaceMethod2::ORDINAL, | |
| 1734 message::MESSAGE_HEADER_NO_FLAG) | |
| 1735 | |
| 1736 } | |
| 1737 } | |
| 1738 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod2Request
{} | |
| 1739 | |
| 1740 /// Message: ConformanceTestInterfaceMethod3 | 1762 /// Message: ConformanceTestInterfaceMethod3 |
| 1741 pub mod ConformanceTestInterfaceMethod3 { | 1763 pub mod ConformanceTestInterfaceMethod3 { |
| 1742 pub const ORDINAL: u32 = 3; | 1764 pub const ORDINAL: u32 = 3; |
| 1743 pub const MIN_VERSION: u32 = 0; | 1765 pub const MIN_VERSION: u32 = 0; |
| 1744 } | 1766 } |
| 1745 // -- ConformanceTestInterfaceMethod3Request -- | 1767 // -- ConformanceTestInterfaceMethod3Request -- |
| 1746 | 1768 |
| 1747 // Constants | 1769 // Constants |
| 1748 // Enums | 1770 // Enums |
| 1749 // Struct version information | 1771 // Struct version information |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1784 impl MojomEncodable for ConformanceTestInterfaceMethod3Request { | 1806 impl MojomEncodable for ConformanceTestInterfaceMethod3Request { |
| 1785 impl_encodable_for_pointer!(); | 1807 impl_encodable_for_pointer!(); |
| 1786 fn compute_size(&self, context: Context) -> usize { | 1808 fn compute_size(&self, context: Context) -> usize { |
| 1787 encoding::align_default(self.serialized_size(&context)) + | 1809 encoding::align_default(self.serialized_size(&context)) + |
| 1788 self.param0.compute_size(context.clone()) | 1810 self.param0.compute_size(context.clone()) |
| 1789 } | 1811 } |
| 1790 } | 1812 } |
| 1791 | 1813 |
| 1792 impl MojomStruct for ConformanceTestInterfaceMethod3Request {} | 1814 impl MojomStruct for ConformanceTestInterfaceMethod3Request {} |
| 1793 impl MojomMessage for ConformanceTestInterfaceMethod3Request { | 1815 impl MojomMessage for ConformanceTestInterfaceMethod3Request { |
| 1816 fn min_version() -> u32 { |
| 1817 ConformanceTestInterfaceMethod3::MIN_VERSION |
| 1818 } |
| 1794 fn create_header() -> MessageHeader { | 1819 fn create_header() -> MessageHeader { |
| 1795 MessageHeader::new(ConformanceTestInterface::VERSION, | 1820 MessageHeader::new(0, |
| 1796 ConformanceTestInterfaceMethod3::ORDINAL, | 1821 ConformanceTestInterfaceMethod3::ORDINAL, |
| 1797 message::MESSAGE_HEADER_NO_FLAG) | 1822 message::MESSAGE_HEADER_NO_FLAG) |
| 1798 | 1823 |
| 1799 } | 1824 } |
| 1800 } | 1825 } |
| 1801 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod3Request
{} | 1826 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod3Request
{} |
| 1802 | 1827 |
| 1803 /// Message: ConformanceTestInterfaceMethod4 | 1828 /// Message: ConformanceTestInterfaceMethod4 |
| 1804 pub mod ConformanceTestInterfaceMethod4 { | 1829 pub mod ConformanceTestInterfaceMethod4 { |
| 1805 pub const ORDINAL: u32 = 4; | 1830 pub const ORDINAL: u32 = 4; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 impl_encodable_for_pointer!(); | 1882 impl_encodable_for_pointer!(); |
| 1858 fn compute_size(&self, context: Context) -> usize { | 1883 fn compute_size(&self, context: Context) -> usize { |
| 1859 encoding::align_default(self.serialized_size(&context)) + | 1884 encoding::align_default(self.serialized_size(&context)) + |
| 1860 self.param0.compute_size(context.clone()) + | 1885 self.param0.compute_size(context.clone()) + |
| 1861 self.param1.compute_size(context.clone()) | 1886 self.param1.compute_size(context.clone()) |
| 1862 } | 1887 } |
| 1863 } | 1888 } |
| 1864 | 1889 |
| 1865 impl MojomStruct for ConformanceTestInterfaceMethod4Request {} | 1890 impl MojomStruct for ConformanceTestInterfaceMethod4Request {} |
| 1866 impl MojomMessage for ConformanceTestInterfaceMethod4Request { | 1891 impl MojomMessage for ConformanceTestInterfaceMethod4Request { |
| 1892 fn min_version() -> u32 { |
| 1893 ConformanceTestInterfaceMethod4::MIN_VERSION |
| 1894 } |
| 1867 fn create_header() -> MessageHeader { | 1895 fn create_header() -> MessageHeader { |
| 1868 MessageHeader::new(ConformanceTestInterface::VERSION, | 1896 MessageHeader::new(0, |
| 1869 ConformanceTestInterfaceMethod4::ORDINAL, | 1897 ConformanceTestInterfaceMethod4::ORDINAL, |
| 1870 message::MESSAGE_HEADER_NO_FLAG) | 1898 message::MESSAGE_HEADER_NO_FLAG) |
| 1871 | 1899 |
| 1872 } | 1900 } |
| 1873 } | 1901 } |
| 1874 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod4Request
{} | 1902 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod4Request
{} |
| 1875 | 1903 |
| 1876 /// Message: ConformanceTestInterfaceMethod5 | 1904 /// Message: ConformanceTestInterfaceMethod5 |
| 1877 pub mod ConformanceTestInterfaceMethod5 { | 1905 pub mod ConformanceTestInterfaceMethod5 { |
| 1878 pub const ORDINAL: u32 = 5; | 1906 pub const ORDINAL: u32 = 5; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1931 impl_encodable_for_pointer!(); | 1959 impl_encodable_for_pointer!(); |
| 1932 fn compute_size(&self, context: Context) -> usize { | 1960 fn compute_size(&self, context: Context) -> usize { |
| 1933 encoding::align_default(self.serialized_size(&context)) + | 1961 encoding::align_default(self.serialized_size(&context)) + |
| 1934 self.param0.compute_size(context.clone()) + | 1962 self.param0.compute_size(context.clone()) + |
| 1935 self.param1.compute_size(context.clone()) | 1963 self.param1.compute_size(context.clone()) |
| 1936 } | 1964 } |
| 1937 } | 1965 } |
| 1938 | 1966 |
| 1939 impl MojomStruct for ConformanceTestInterfaceMethod5Request {} | 1967 impl MojomStruct for ConformanceTestInterfaceMethod5Request {} |
| 1940 impl MojomMessage for ConformanceTestInterfaceMethod5Request { | 1968 impl MojomMessage for ConformanceTestInterfaceMethod5Request { |
| 1969 fn min_version() -> u32 { |
| 1970 ConformanceTestInterfaceMethod5::MIN_VERSION |
| 1971 } |
| 1941 fn create_header() -> MessageHeader { | 1972 fn create_header() -> MessageHeader { |
| 1942 MessageHeader::new(ConformanceTestInterface::VERSION, | 1973 MessageHeader::new(0, |
| 1943 ConformanceTestInterfaceMethod5::ORDINAL, | 1974 ConformanceTestInterfaceMethod5::ORDINAL, |
| 1944 message::MESSAGE_HEADER_NO_FLAG) | 1975 message::MESSAGE_HEADER_NO_FLAG) |
| 1945 | 1976 |
| 1946 } | 1977 } |
| 1947 } | 1978 } |
| 1948 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod5Request
{} | 1979 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod5Request
{} |
| 1949 | 1980 |
| 1950 /// Message: ConformanceTestInterfaceMethod10 | 1981 /// Message: ConformanceTestInterfaceMethod7 |
| 1951 pub mod ConformanceTestInterfaceMethod10 { | 1982 pub mod ConformanceTestInterfaceMethod7 { |
| 1952 pub const ORDINAL: u32 = 10; | 1983 pub const ORDINAL: u32 = 7; |
| 1953 pub const MIN_VERSION: u32 = 0; | 1984 pub const MIN_VERSION: u32 = 0; |
| 1954 } | 1985 } |
| 1955 // -- ConformanceTestInterfaceMethod10Request -- | 1986 // -- ConformanceTestInterfaceMethod7Request -- |
| 1956 | 1987 |
| 1957 // Constants | 1988 // Constants |
| 1958 // Enums | 1989 // Enums |
| 1959 // Struct version information | 1990 // Struct version information |
| 1960 const ConformanceTestInterfaceMethod10RequestVersions: [(u32, u32); 1] = [(0, 16
)]; | 1991 const ConformanceTestInterfaceMethod7RequestVersions: [(u32, u32); 1] = [(0, 24)
]; |
| 1961 | 1992 |
| 1962 // Struct definition | 1993 // Struct definition |
| 1963 pub struct ConformanceTestInterfaceMethod10Request { | 1994 pub struct ConformanceTestInterfaceMethod7Request { |
| 1964 pub param0: HashMap<String, u8>, | 1995 pub param0: StructF, |
| 1996 pub param1: [Option<[u8; 3]>; 2], |
| 1965 } | 1997 } |
| 1966 | 1998 |
| 1967 impl MojomPointer for ConformanceTestInterfaceMethod10Request { | 1999 impl MojomPointer for ConformanceTestInterfaceMethod7Request { |
| 1968 fn header_data(&self) -> DataHeaderValue { | 2000 fn header_data(&self) -> DataHeaderValue { |
| 1969 DataHeaderValue::Version(0) | 2001 DataHeaderValue::Version(0) |
| 1970 } | 2002 } |
| 1971 fn serialized_size(&self, _context: &Context) -> usize { | 2003 fn serialized_size(&self, _context: &Context) -> usize { |
| 1972 16 | 2004 24 |
| 1973 } | 2005 } |
| 1974 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2006 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 1975 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2007 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2008 MojomEncodable::encode(self.param1, encoder, context.clone()); |
| 1976 | 2009 |
| 1977 } | 2010 } |
| 1978 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2011 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 1979 let version = { | 2012 let version = { |
| 1980 let mut state = decoder.get_mut(&context); | 2013 let mut state = decoder.get_mut(&context); |
| 1981 match state.decode_struct_header(&ConformanceTestInterfaceMethod10Re
questVersions) { | 2014 match state.decode_struct_header(&ConformanceTestInterfaceMethod7Req
uestVersions) { |
| 1982 Ok(header) => header.data(), | 2015 Ok(header) => header.data(), |
| 1983 Err(err) => return Err(err), | 2016 Err(err) => return Err(err), |
| 1984 } | 2017 } |
| 1985 }; | 2018 }; |
| 1986 let param0 = match <HashMap<String, u8>>::decode(decoder, context.clone(
)) { | 2019 let param0 = match <StructF>::decode(decoder, context.clone()) { |
| 1987 Ok(value) => value, | 2020 Ok(value) => value, |
| 1988 Err(err) => return Err(err), | 2021 Err(err) => return Err(err), |
| 1989 }; | 2022 }; |
| 1990 Ok(ConformanceTestInterfaceMethod10Request { param0: param0 }) | 2023 let param1 = match <[Option<[u8; 3]>; 2]>::decode(decoder, context.clone
()) { |
| 2024 Ok(value) => value, |
| 2025 Err(err) => return Err(err), |
| 2026 }; |
| 2027 Ok(ConformanceTestInterfaceMethod7Request { |
| 2028 param0: param0, |
| 2029 param1: param1, |
| 2030 }) |
| 1991 } | 2031 } |
| 1992 } | 2032 } |
| 1993 | 2033 |
| 1994 impl MojomEncodable for ConformanceTestInterfaceMethod10Request { | 2034 impl MojomEncodable for ConformanceTestInterfaceMethod7Request { |
| 1995 impl_encodable_for_pointer!(); | 2035 impl_encodable_for_pointer!(); |
| 1996 fn compute_size(&self, context: Context) -> usize { | 2036 fn compute_size(&self, context: Context) -> usize { |
| 1997 encoding::align_default(self.serialized_size(&context)) + | 2037 encoding::align_default(self.serialized_size(&context)) + |
| 1998 self.param0.compute_size(context.clone()) | 2038 self.param0.compute_size(context.clone()) + |
| 2039 self.param1.compute_size(context.clone()) |
| 1999 } | 2040 } |
| 2000 } | 2041 } |
| 2001 | 2042 |
| 2002 impl MojomStruct for ConformanceTestInterfaceMethod10Request {} | 2043 impl MojomStruct for ConformanceTestInterfaceMethod7Request {} |
| 2003 impl MojomMessage for ConformanceTestInterfaceMethod10Request { | 2044 impl MojomMessage for ConformanceTestInterfaceMethod7Request { |
| 2045 fn min_version() -> u32 { |
| 2046 ConformanceTestInterfaceMethod7::MIN_VERSION |
| 2047 } |
| 2004 fn create_header() -> MessageHeader { | 2048 fn create_header() -> MessageHeader { |
| 2005 MessageHeader::new(ConformanceTestInterface::VERSION, | 2049 MessageHeader::new(0, |
| 2006 ConformanceTestInterfaceMethod10::ORDINAL, | 2050 ConformanceTestInterfaceMethod7::ORDINAL, |
| 2007 message::MESSAGE_HEADER_NO_FLAG) | 2051 message::MESSAGE_HEADER_NO_FLAG) |
| 2008 | 2052 |
| 2009 } | 2053 } |
| 2010 } | 2054 } |
| 2011 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod10Request
{} | 2055 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod7Request
{} |
| 2012 | 2056 |
| 2013 /// Message: ConformanceTestInterfaceMethod6 | 2057 /// Message: ConformanceTestInterfaceMethod12 |
| 2014 pub mod ConformanceTestInterfaceMethod6 { | 2058 pub mod ConformanceTestInterfaceMethod12 { |
| 2015 pub const ORDINAL: u32 = 6; | 2059 pub const ORDINAL: u32 = 12; |
| 2016 pub const MIN_VERSION: u32 = 0; | 2060 pub const MIN_VERSION: u32 = 0; |
| 2017 } | 2061 } |
| 2018 // -- ConformanceTestInterfaceMethod6Request -- | 2062 // -- ConformanceTestInterfaceMethod12Request -- |
| 2019 | 2063 |
| 2020 // Constants | 2064 // Constants |
| 2021 // Enums | 2065 // Enums |
| 2022 // Struct version information | 2066 // Struct version information |
| 2023 const ConformanceTestInterfaceMethod6RequestVersions: [(u32, u32); 1] = [(0, 16)
]; | 2067 const ConformanceTestInterfaceMethod12RequestVersions: [(u32, u32); 1] = [(0, 16
)]; |
| 2024 | 2068 |
| 2025 // Struct definition | 2069 // Struct definition |
| 2026 pub struct ConformanceTestInterfaceMethod6Request { | 2070 pub struct ConformanceTestInterfaceMethod12Request { |
| 2027 pub param0: Vec<Vec<u8>>, | 2071 pub param0: f32, |
| 2028 } | 2072 } |
| 2029 | 2073 |
| 2030 impl MojomPointer for ConformanceTestInterfaceMethod6Request { | 2074 impl MojomPointer for ConformanceTestInterfaceMethod12Request { |
| 2031 fn header_data(&self) -> DataHeaderValue { | 2075 fn header_data(&self) -> DataHeaderValue { |
| 2032 DataHeaderValue::Version(0) | 2076 DataHeaderValue::Version(0) |
| 2033 } | 2077 } |
| 2034 fn serialized_size(&self, _context: &Context) -> usize { | 2078 fn serialized_size(&self, _context: &Context) -> usize { |
| 2035 16 | 2079 16 |
| 2036 } | 2080 } |
| 2037 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2081 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2038 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2082 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2039 | 2083 |
| 2040 } | 2084 } |
| 2041 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2085 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2042 let version = { | 2086 let version = { |
| 2043 let mut state = decoder.get_mut(&context); | 2087 let mut state = decoder.get_mut(&context); |
| 2044 match state.decode_struct_header(&ConformanceTestInterfaceMethod6Req
uestVersions) { | 2088 match state.decode_struct_header(&ConformanceTestInterfaceMethod12Re
questVersions) { |
| 2045 Ok(header) => header.data(), | 2089 Ok(header) => header.data(), |
| 2046 Err(err) => return Err(err), | 2090 Err(err) => return Err(err), |
| 2047 } | 2091 } |
| 2048 }; | 2092 }; |
| 2049 let param0 = match <Vec<Vec<u8>>>::decode(decoder, context.clone()) { | 2093 let param0 = match <f32>::decode(decoder, context.clone()) { |
| 2050 Ok(value) => value, | 2094 Ok(value) => value, |
| 2051 Err(err) => return Err(err), | 2095 Err(err) => return Err(err), |
| 2052 }; | 2096 }; |
| 2053 Ok(ConformanceTestInterfaceMethod6Request { param0: param0 }) | 2097 Ok(ConformanceTestInterfaceMethod12Request { param0: param0 }) |
| 2054 } | 2098 } |
| 2055 } | 2099 } |
| 2056 | 2100 |
| 2057 impl MojomEncodable for ConformanceTestInterfaceMethod6Request { | 2101 impl MojomEncodable for ConformanceTestInterfaceMethod12Request { |
| 2058 impl_encodable_for_pointer!(); | 2102 impl_encodable_for_pointer!(); |
| 2059 fn compute_size(&self, context: Context) -> usize { | 2103 fn compute_size(&self, context: Context) -> usize { |
| 2060 encoding::align_default(self.serialized_size(&context)) + | 2104 encoding::align_default(self.serialized_size(&context)) + |
| 2061 self.param0.compute_size(context.clone()) | 2105 self.param0.compute_size(context.clone()) |
| 2062 } | 2106 } |
| 2063 } | 2107 } |
| 2064 | 2108 |
| 2065 impl MojomStruct for ConformanceTestInterfaceMethod6Request {} | 2109 impl MojomStruct for ConformanceTestInterfaceMethod12Request {} |
| 2066 impl MojomMessage for ConformanceTestInterfaceMethod6Request { | 2110 impl MojomMessage for ConformanceTestInterfaceMethod12Request { |
| 2111 fn min_version() -> u32 { |
| 2112 ConformanceTestInterfaceMethod12::MIN_VERSION |
| 2113 } |
| 2067 fn create_header() -> MessageHeader { | 2114 fn create_header() -> MessageHeader { |
| 2068 MessageHeader::new(ConformanceTestInterface::VERSION, | 2115 MessageHeader::new(1, |
| 2069 ConformanceTestInterfaceMethod6::ORDINAL, | 2116 ConformanceTestInterfaceMethod12::ORDINAL, |
| 2070 message::MESSAGE_HEADER_NO_FLAG) | 2117 message::MESSAGE_HEADER_EXPECT_RESPONSE) |
| 2071 | 2118 |
| 2072 } | 2119 } |
| 2073 } | 2120 } |
| 2074 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod6Request
{} | 2121 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod12Request
{} |
| 2075 | 2122 |
| 2076 /// Message: ConformanceTestInterfaceMethod7 | 2123 // -- ConformanceTestInterfaceMethod12Response -- |
| 2077 pub mod ConformanceTestInterfaceMethod7 { | |
| 2078 pub const ORDINAL: u32 = 7; | |
| 2079 pub const MIN_VERSION: u32 = 0; | |
| 2080 } | |
| 2081 // -- ConformanceTestInterfaceMethod7Request -- | |
| 2082 | 2124 |
| 2083 // Constants | 2125 // Constants |
| 2084 // Enums | 2126 // Enums |
| 2085 // Struct version information | 2127 // Struct version information |
| 2086 const ConformanceTestInterfaceMethod7RequestVersions: [(u32, u32); 1] = [(0, 24)
]; | 2128 const ConformanceTestInterfaceMethod12ResponseVersions: [(u32, u32); 1] = [(0, 1
6)]; |
| 2087 | 2129 |
| 2088 // Struct definition | 2130 // Struct definition |
| 2089 pub struct ConformanceTestInterfaceMethod7Request { | 2131 pub struct ConformanceTestInterfaceMethod12Response { |
| 2090 pub param0: StructF, | 2132 pub param0: f32, |
| 2091 pub param1: [Option<[u8; 3]>; 2], | |
| 2092 } | 2133 } |
| 2093 | 2134 |
| 2094 impl MojomPointer for ConformanceTestInterfaceMethod7Request { | 2135 impl MojomPointer for ConformanceTestInterfaceMethod12Response { |
| 2095 fn header_data(&self) -> DataHeaderValue { | 2136 fn header_data(&self) -> DataHeaderValue { |
| 2096 DataHeaderValue::Version(0) | 2137 DataHeaderValue::Version(0) |
| 2097 } | 2138 } |
| 2139 fn serialized_size(&self, _context: &Context) -> usize { |
| 2140 16 |
| 2141 } |
| 2142 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2143 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2144 |
| 2145 } |
| 2146 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2147 let version = { |
| 2148 let mut state = decoder.get_mut(&context); |
| 2149 match state.decode_struct_header(&ConformanceTestInterfaceMethod12Re
sponseVersions) { |
| 2150 Ok(header) => header.data(), |
| 2151 Err(err) => return Err(err), |
| 2152 } |
| 2153 }; |
| 2154 let param0 = match <f32>::decode(decoder, context.clone()) { |
| 2155 Ok(value) => value, |
| 2156 Err(err) => return Err(err), |
| 2157 }; |
| 2158 Ok(ConformanceTestInterfaceMethod12Response { param0: param0 }) |
| 2159 } |
| 2160 } |
| 2161 |
| 2162 impl MojomEncodable for ConformanceTestInterfaceMethod12Response { |
| 2163 impl_encodable_for_pointer!(); |
| 2164 fn compute_size(&self, context: Context) -> usize { |
| 2165 encoding::align_default(self.serialized_size(&context)) + |
| 2166 self.param0.compute_size(context.clone()) |
| 2167 } |
| 2168 } |
| 2169 |
| 2170 impl MojomStruct for ConformanceTestInterfaceMethod12Response {} |
| 2171 |
| 2172 impl MojomMessage for ConformanceTestInterfaceMethod12Response { |
| 2173 fn min_version() -> u32 { |
| 2174 ConformanceTestInterfaceMethod12::MIN_VERSION |
| 2175 } |
| 2176 fn create_header() -> MessageHeader { |
| 2177 MessageHeader::new(1, |
| 2178 ConformanceTestInterfaceMethod12::ORDINAL, |
| 2179 message::MESSAGE_HEADER_IS_RESPONSE) |
| 2180 } |
| 2181 } |
| 2182 impl ConformanceTestInterfaceResponse for ConformanceTestInterfaceMethod12Respon
se {} |
| 2183 /// Message: ConformanceTestInterfaceMethod14 |
| 2184 pub mod ConformanceTestInterfaceMethod14 { |
| 2185 pub const ORDINAL: u32 = 14; |
| 2186 pub const MIN_VERSION: u32 = 0; |
| 2187 } |
| 2188 // -- ConformanceTestInterfaceMethod14Request -- |
| 2189 |
| 2190 // Constants |
| 2191 // Enums |
| 2192 // Struct version information |
| 2193 const ConformanceTestInterfaceMethod14RequestVersions: [(u32, u32); 1] = [(0, 24
)]; |
| 2194 |
| 2195 // Struct definition |
| 2196 pub struct ConformanceTestInterfaceMethod14Request { |
| 2197 pub param0: UnionA, |
| 2198 } |
| 2199 |
| 2200 impl MojomPointer for ConformanceTestInterfaceMethod14Request { |
| 2201 fn header_data(&self) -> DataHeaderValue { |
| 2202 DataHeaderValue::Version(0) |
| 2203 } |
| 2098 fn serialized_size(&self, _context: &Context) -> usize { | 2204 fn serialized_size(&self, _context: &Context) -> usize { |
| 2099 24 | 2205 24 |
| 2100 } | 2206 } |
| 2101 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2207 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2102 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2208 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2103 MojomEncodable::encode(self.param1, encoder, context.clone()); | |
| 2104 | 2209 |
| 2105 } | 2210 } |
| 2106 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2211 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2107 let version = { | 2212 let version = { |
| 2108 let mut state = decoder.get_mut(&context); | 2213 let mut state = decoder.get_mut(&context); |
| 2109 match state.decode_struct_header(&ConformanceTestInterfaceMethod7Req
uestVersions) { | 2214 match state.decode_struct_header(&ConformanceTestInterfaceMethod14Re
questVersions) { |
| 2110 Ok(header) => header.data(), | 2215 Ok(header) => header.data(), |
| 2111 Err(err) => return Err(err), | 2216 Err(err) => return Err(err), |
| 2112 } | 2217 } |
| 2113 }; | 2218 }; |
| 2114 let param0 = match <StructF>::decode(decoder, context.clone()) { | 2219 let param0 = match <UnionA>::decode(decoder, context.clone()) { |
| 2115 Ok(value) => value, | 2220 Ok(value) => value, |
| 2116 Err(err) => return Err(err), | 2221 Err(err) => return Err(err), |
| 2117 }; | 2222 }; |
| 2118 let param1 = match <[Option<[u8; 3]>; 2]>::decode(decoder, context.clone
()) { | 2223 Ok(ConformanceTestInterfaceMethod14Request { param0: param0 }) |
| 2119 Ok(value) => value, | |
| 2120 Err(err) => return Err(err), | |
| 2121 }; | |
| 2122 Ok(ConformanceTestInterfaceMethod7Request { | |
| 2123 param0: param0, | |
| 2124 param1: param1, | |
| 2125 }) | |
| 2126 } | 2224 } |
| 2127 } | 2225 } |
| 2128 | 2226 |
| 2129 impl MojomEncodable for ConformanceTestInterfaceMethod7Request { | 2227 impl MojomEncodable for ConformanceTestInterfaceMethod14Request { |
| 2130 impl_encodable_for_pointer!(); | 2228 impl_encodable_for_pointer!(); |
| 2131 fn compute_size(&self, context: Context) -> usize { | 2229 fn compute_size(&self, context: Context) -> usize { |
| 2132 encoding::align_default(self.serialized_size(&context)) + | 2230 encoding::align_default(self.serialized_size(&context)) + |
| 2133 self.param0.compute_size(context.clone()) + | 2231 self.param0.compute_size(context.clone()) |
| 2134 self.param1.compute_size(context.clone()) | |
| 2135 } | 2232 } |
| 2136 } | 2233 } |
| 2137 | 2234 |
| 2138 impl MojomStruct for ConformanceTestInterfaceMethod7Request {} | 2235 impl MojomStruct for ConformanceTestInterfaceMethod14Request {} |
| 2139 impl MojomMessage for ConformanceTestInterfaceMethod7Request { | 2236 impl MojomMessage for ConformanceTestInterfaceMethod14Request { |
| 2237 fn min_version() -> u32 { |
| 2238 ConformanceTestInterfaceMethod14::MIN_VERSION |
| 2239 } |
| 2140 fn create_header() -> MessageHeader { | 2240 fn create_header() -> MessageHeader { |
| 2141 MessageHeader::new(ConformanceTestInterface::VERSION, | 2241 MessageHeader::new(0, |
| 2142 ConformanceTestInterfaceMethod7::ORDINAL, | 2242 ConformanceTestInterfaceMethod14::ORDINAL, |
| 2143 message::MESSAGE_HEADER_NO_FLAG) | 2243 message::MESSAGE_HEADER_NO_FLAG) |
| 2144 | 2244 |
| 2145 } | 2245 } |
| 2146 } | 2246 } |
| 2147 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod7Request
{} | 2247 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod14Request
{} |
| 2148 | 2248 |
| 2149 /// Message: ConformanceTestInterfaceMethod8 | 2249 /// Message: ConformanceTestInterfaceMethod15 |
| 2150 pub mod ConformanceTestInterfaceMethod8 { | 2250 pub mod ConformanceTestInterfaceMethod15 { |
| 2151 pub const ORDINAL: u32 = 8; | 2251 pub const ORDINAL: u32 = 15; |
| 2152 pub const MIN_VERSION: u32 = 0; | 2252 pub const MIN_VERSION: u32 = 0; |
| 2153 } | 2253 } |
| 2154 // -- ConformanceTestInterfaceMethod8Request -- | 2254 // -- ConformanceTestInterfaceMethod15Request -- |
| 2155 | 2255 |
| 2156 // Constants | 2256 // Constants |
| 2157 // Enums | 2257 // Enums |
| 2158 // Struct version information | 2258 // Struct version information |
| 2159 const ConformanceTestInterfaceMethod8RequestVersions: [(u32, u32); 1] = [(0, 16)
]; | 2259 const ConformanceTestInterfaceMethod15RequestVersions: [(u32, u32); 1] = [(0, 16
)]; |
| 2160 | 2260 |
| 2161 // Struct definition | 2261 // Struct definition |
| 2162 pub struct ConformanceTestInterfaceMethod8Request { | 2262 pub struct ConformanceTestInterfaceMethod15Request { |
| 2163 pub param0: Vec<Option<Vec<String>>>, | 2263 pub param0: StructH, |
| 2164 } | 2264 } |
| 2165 | 2265 |
| 2166 impl MojomPointer for ConformanceTestInterfaceMethod8Request { | 2266 impl MojomPointer for ConformanceTestInterfaceMethod15Request { |
| 2167 fn header_data(&self) -> DataHeaderValue { | 2267 fn header_data(&self) -> DataHeaderValue { |
| 2168 DataHeaderValue::Version(0) | 2268 DataHeaderValue::Version(0) |
| 2169 } | 2269 } |
| 2270 fn serialized_size(&self, _context: &Context) -> usize { |
| 2271 16 |
| 2272 } |
| 2273 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2274 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2275 |
| 2276 } |
| 2277 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2278 let version = { |
| 2279 let mut state = decoder.get_mut(&context); |
| 2280 match state.decode_struct_header(&ConformanceTestInterfaceMethod15Re
questVersions) { |
| 2281 Ok(header) => header.data(), |
| 2282 Err(err) => return Err(err), |
| 2283 } |
| 2284 }; |
| 2285 let param0 = match <StructH>::decode(decoder, context.clone()) { |
| 2286 Ok(value) => value, |
| 2287 Err(err) => return Err(err), |
| 2288 }; |
| 2289 Ok(ConformanceTestInterfaceMethod15Request { param0: param0 }) |
| 2290 } |
| 2291 } |
| 2292 |
| 2293 impl MojomEncodable for ConformanceTestInterfaceMethod15Request { |
| 2294 impl_encodable_for_pointer!(); |
| 2295 fn compute_size(&self, context: Context) -> usize { |
| 2296 encoding::align_default(self.serialized_size(&context)) + |
| 2297 self.param0.compute_size(context.clone()) |
| 2298 } |
| 2299 } |
| 2300 |
| 2301 impl MojomStruct for ConformanceTestInterfaceMethod15Request {} |
| 2302 impl MojomMessage for ConformanceTestInterfaceMethod15Request { |
| 2303 fn min_version() -> u32 { |
| 2304 ConformanceTestInterfaceMethod15::MIN_VERSION |
| 2305 } |
| 2306 fn create_header() -> MessageHeader { |
| 2307 MessageHeader::new(0, |
| 2308 ConformanceTestInterfaceMethod15::ORDINAL, |
| 2309 message::MESSAGE_HEADER_NO_FLAG) |
| 2310 |
| 2311 } |
| 2312 } |
| 2313 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod15Request
{} |
| 2314 |
| 2315 /// Message: ConformanceTestInterfaceMethod1 |
| 2316 pub mod ConformanceTestInterfaceMethod1 { |
| 2317 pub const ORDINAL: u32 = 1; |
| 2318 pub const MIN_VERSION: u32 = 0; |
| 2319 } |
| 2320 // -- ConformanceTestInterfaceMethod1Request -- |
| 2321 |
| 2322 // Constants |
| 2323 // Enums |
| 2324 // Struct version information |
| 2325 const ConformanceTestInterfaceMethod1RequestVersions: [(u32, u32); 1] = [(0, 16)
]; |
| 2326 |
| 2327 // Struct definition |
| 2328 pub struct ConformanceTestInterfaceMethod1Request { |
| 2329 pub param0: StructA, |
| 2330 } |
| 2331 |
| 2332 impl MojomPointer for ConformanceTestInterfaceMethod1Request { |
| 2333 fn header_data(&self) -> DataHeaderValue { |
| 2334 DataHeaderValue::Version(0) |
| 2335 } |
| 2170 fn serialized_size(&self, _context: &Context) -> usize { | 2336 fn serialized_size(&self, _context: &Context) -> usize { |
| 2171 16 | 2337 16 |
| 2172 } | 2338 } |
| 2173 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2339 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2174 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2340 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2175 | 2341 |
| 2176 } | 2342 } |
| 2177 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2343 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2178 let version = { | 2344 let version = { |
| 2179 let mut state = decoder.get_mut(&context); | 2345 let mut state = decoder.get_mut(&context); |
| 2180 match state.decode_struct_header(&ConformanceTestInterfaceMethod8Req
uestVersions) { | 2346 match state.decode_struct_header(&ConformanceTestInterfaceMethod1Req
uestVersions) { |
| 2181 Ok(header) => header.data(), | 2347 Ok(header) => header.data(), |
| 2182 Err(err) => return Err(err), | 2348 Err(err) => return Err(err), |
| 2183 } | 2349 } |
| 2184 }; | 2350 }; |
| 2185 let param0 = match <Vec<Option<Vec<String>>>>::decode(decoder, context.c
lone()) { | 2351 let param0 = match <StructA>::decode(decoder, context.clone()) { |
| 2186 Ok(value) => value, | 2352 Ok(value) => value, |
| 2187 Err(err) => return Err(err), | 2353 Err(err) => return Err(err), |
| 2188 }; | 2354 }; |
| 2189 Ok(ConformanceTestInterfaceMethod8Request { param0: param0 }) | 2355 Ok(ConformanceTestInterfaceMethod1Request { param0: param0 }) |
| 2190 } | 2356 } |
| 2191 } | 2357 } |
| 2192 | 2358 |
| 2193 impl MojomEncodable for ConformanceTestInterfaceMethod8Request { | 2359 impl MojomEncodable for ConformanceTestInterfaceMethod1Request { |
| 2194 impl_encodable_for_pointer!(); | 2360 impl_encodable_for_pointer!(); |
| 2195 fn compute_size(&self, context: Context) -> usize { | 2361 fn compute_size(&self, context: Context) -> usize { |
| 2196 encoding::align_default(self.serialized_size(&context)) + | 2362 encoding::align_default(self.serialized_size(&context)) + |
| 2197 self.param0.compute_size(context.clone()) | 2363 self.param0.compute_size(context.clone()) |
| 2198 } | 2364 } |
| 2199 } | 2365 } |
| 2200 | 2366 |
| 2201 impl MojomStruct for ConformanceTestInterfaceMethod8Request {} | 2367 impl MojomStruct for ConformanceTestInterfaceMethod1Request {} |
| 2202 impl MojomMessage for ConformanceTestInterfaceMethod8Request { | 2368 impl MojomMessage for ConformanceTestInterfaceMethod1Request { |
| 2369 fn min_version() -> u32 { |
| 2370 ConformanceTestInterfaceMethod1::MIN_VERSION |
| 2371 } |
| 2203 fn create_header() -> MessageHeader { | 2372 fn create_header() -> MessageHeader { |
| 2204 MessageHeader::new(ConformanceTestInterface::VERSION, | 2373 MessageHeader::new(0, |
| 2205 ConformanceTestInterfaceMethod8::ORDINAL, | 2374 ConformanceTestInterfaceMethod1::ORDINAL, |
| 2206 message::MESSAGE_HEADER_NO_FLAG) | 2375 message::MESSAGE_HEADER_NO_FLAG) |
| 2207 | 2376 |
| 2208 } | 2377 } |
| 2209 } | 2378 } |
| 2210 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod8Request
{} | 2379 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod1Request
{} |
| 2211 | 2380 |
| 2212 /// Message: ConformanceTestInterfaceMethod9 | 2381 /// Message: ConformanceTestInterfaceMethod2 |
| 2213 pub mod ConformanceTestInterfaceMethod9 { | 2382 pub mod ConformanceTestInterfaceMethod2 { |
| 2214 pub const ORDINAL: u32 = 9; | 2383 pub const ORDINAL: u32 = 2; |
| 2215 pub const MIN_VERSION: u32 = 0; | 2384 pub const MIN_VERSION: u32 = 0; |
| 2216 } | 2385 } |
| 2217 // -- ConformanceTestInterfaceMethod9Request -- | 2386 // -- ConformanceTestInterfaceMethod2Request -- |
| 2218 | 2387 |
| 2219 // Constants | 2388 // Constants |
| 2220 // Enums | 2389 // Enums |
| 2221 // Struct version information | 2390 // Struct version information |
| 2222 const ConformanceTestInterfaceMethod9RequestVersions: [(u32, u32); 1] = [(0, 16)
]; | 2391 const ConformanceTestInterfaceMethod2RequestVersions: [(u32, u32); 1] = [(0, 24)
]; |
| 2223 | 2392 |
| 2224 // Struct definition | 2393 // Struct definition |
| 2225 pub struct ConformanceTestInterfaceMethod9Request { | 2394 pub struct ConformanceTestInterfaceMethod2Request { |
| 2226 pub param0: Option<Vec<Vec<Option<system::UntypedHandle>>>>, | 2395 pub param0: StructB, |
| 2396 pub param1: StructA, |
| 2227 } | 2397 } |
| 2228 | 2398 |
| 2229 impl MojomPointer for ConformanceTestInterfaceMethod9Request { | 2399 impl MojomPointer for ConformanceTestInterfaceMethod2Request { |
| 2230 fn header_data(&self) -> DataHeaderValue { | 2400 fn header_data(&self) -> DataHeaderValue { |
| 2231 DataHeaderValue::Version(0) | 2401 DataHeaderValue::Version(0) |
| 2232 } | 2402 } |
| 2233 fn serialized_size(&self, _context: &Context) -> usize { | 2403 fn serialized_size(&self, _context: &Context) -> usize { |
| 2234 16 | 2404 24 |
| 2235 } | 2405 } |
| 2236 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2406 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2237 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2407 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2408 MojomEncodable::encode(self.param1, encoder, context.clone()); |
| 2238 | 2409 |
| 2239 } | 2410 } |
| 2240 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2411 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2241 let version = { | 2412 let version = { |
| 2242 let mut state = decoder.get_mut(&context); | 2413 let mut state = decoder.get_mut(&context); |
| 2243 match state.decode_struct_header(&ConformanceTestInterfaceMethod9Req
uestVersions) { | 2414 match state.decode_struct_header(&ConformanceTestInterfaceMethod2Req
uestVersions) { |
| 2244 Ok(header) => header.data(), | 2415 Ok(header) => header.data(), |
| 2245 Err(err) => return Err(err), | 2416 Err(err) => return Err(err), |
| 2246 } | 2417 } |
| 2247 }; | 2418 }; |
| 2248 let param0 = match <Option<Vec<Vec<Option<system::UntypedHandle>>>>>::de
code(decoder, context.clone()) { | 2419 let param0 = match <StructB>::decode(decoder, context.clone()) { |
| 2249 Ok(value) => value, | 2420 Ok(value) => value, |
| 2250 Err(err) => return Err(err), | 2421 Err(err) => return Err(err), |
| 2251 }; | 2422 }; |
| 2252 Ok(ConformanceTestInterfaceMethod9Request { param0: param0 }) | 2423 let param1 = match <StructA>::decode(decoder, context.clone()) { |
| 2424 Ok(value) => value, |
| 2425 Err(err) => return Err(err), |
| 2426 }; |
| 2427 Ok(ConformanceTestInterfaceMethod2Request { |
| 2428 param0: param0, |
| 2429 param1: param1, |
| 2430 }) |
| 2253 } | 2431 } |
| 2254 } | 2432 } |
| 2255 | 2433 |
| 2256 impl MojomEncodable for ConformanceTestInterfaceMethod9Request { | 2434 impl MojomEncodable for ConformanceTestInterfaceMethod2Request { |
| 2257 impl_encodable_for_pointer!(); | 2435 impl_encodable_for_pointer!(); |
| 2258 fn compute_size(&self, context: Context) -> usize { | 2436 fn compute_size(&self, context: Context) -> usize { |
| 2259 encoding::align_default(self.serialized_size(&context)) + | 2437 encoding::align_default(self.serialized_size(&context)) + |
| 2260 self.param0.compute_size(context.clone()) | 2438 self.param0.compute_size(context.clone()) + |
| 2439 self.param1.compute_size(context.clone()) |
| 2261 } | 2440 } |
| 2262 } | 2441 } |
| 2263 | 2442 |
| 2264 impl MojomStruct for ConformanceTestInterfaceMethod9Request {} | 2443 impl MojomStruct for ConformanceTestInterfaceMethod2Request {} |
| 2265 impl MojomMessage for ConformanceTestInterfaceMethod9Request { | 2444 impl MojomMessage for ConformanceTestInterfaceMethod2Request { |
| 2445 fn min_version() -> u32 { |
| 2446 ConformanceTestInterfaceMethod2::MIN_VERSION |
| 2447 } |
| 2266 fn create_header() -> MessageHeader { | 2448 fn create_header() -> MessageHeader { |
| 2267 MessageHeader::new(ConformanceTestInterface::VERSION, | 2449 MessageHeader::new(0, |
| 2268 ConformanceTestInterfaceMethod9::ORDINAL, | 2450 ConformanceTestInterfaceMethod2::ORDINAL, |
| 2269 message::MESSAGE_HEADER_NO_FLAG) | 2451 message::MESSAGE_HEADER_NO_FLAG) |
| 2270 | 2452 |
| 2271 } | 2453 } |
| 2272 } | 2454 } |
| 2273 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod9Request
{} | 2455 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod2Request
{} |
| 2274 | 2456 |
| 2275 /// Message: ConformanceTestInterfaceMethod11 | 2457 /// Message: ConformanceTestInterfaceMethod6 |
| 2276 pub mod ConformanceTestInterfaceMethod11 { | 2458 pub mod ConformanceTestInterfaceMethod6 { |
| 2277 pub const ORDINAL: u32 = 11; | 2459 pub const ORDINAL: u32 = 6; |
| 2278 pub const MIN_VERSION: u32 = 0; | 2460 pub const MIN_VERSION: u32 = 0; |
| 2279 } | 2461 } |
| 2280 // -- ConformanceTestInterfaceMethod11Request -- | 2462 // -- ConformanceTestInterfaceMethod6Request -- |
| 2281 | 2463 |
| 2282 // Constants | 2464 // Constants |
| 2283 // Enums | 2465 // Enums |
| 2284 // Struct version information | 2466 // Struct version information |
| 2285 const ConformanceTestInterfaceMethod11RequestVersions: [(u32, u32); 1] = [(0, 16
)]; | 2467 const ConformanceTestInterfaceMethod6RequestVersions: [(u32, u32); 1] = [(0, 16)
]; |
| 2286 | 2468 |
| 2287 // Struct definition | 2469 // Struct definition |
| 2288 pub struct ConformanceTestInterfaceMethod11Request { | 2470 pub struct ConformanceTestInterfaceMethod6Request { |
| 2289 pub param0: StructG, | 2471 pub param0: Vec<Vec<u8>>, |
| 2290 } | 2472 } |
| 2291 | 2473 |
| 2292 impl MojomPointer for ConformanceTestInterfaceMethod11Request { | 2474 impl MojomPointer for ConformanceTestInterfaceMethod6Request { |
| 2293 fn header_data(&self) -> DataHeaderValue { | 2475 fn header_data(&self) -> DataHeaderValue { |
| 2294 DataHeaderValue::Version(0) | 2476 DataHeaderValue::Version(0) |
| 2295 } | 2477 } |
| 2296 fn serialized_size(&self, _context: &Context) -> usize { | 2478 fn serialized_size(&self, _context: &Context) -> usize { |
| 2297 16 | 2479 16 |
| 2298 } | 2480 } |
| 2299 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2481 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2300 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2482 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2301 | 2483 |
| 2302 } | 2484 } |
| 2303 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2485 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2304 let version = { | 2486 let version = { |
| 2305 let mut state = decoder.get_mut(&context); | 2487 let mut state = decoder.get_mut(&context); |
| 2306 match state.decode_struct_header(&ConformanceTestInterfaceMethod11Re
questVersions) { | 2488 match state.decode_struct_header(&ConformanceTestInterfaceMethod6Req
uestVersions) { |
| 2307 Ok(header) => header.data(), | 2489 Ok(header) => header.data(), |
| 2308 Err(err) => return Err(err), | 2490 Err(err) => return Err(err), |
| 2309 } | 2491 } |
| 2310 }; | 2492 }; |
| 2311 let param0 = match <StructG>::decode(decoder, context.clone()) { | 2493 let param0 = match <Vec<Vec<u8>>>::decode(decoder, context.clone()) { |
| 2312 Ok(value) => value, | 2494 Ok(value) => value, |
| 2313 Err(err) => return Err(err), | 2495 Err(err) => return Err(err), |
| 2314 }; | 2496 }; |
| 2315 Ok(ConformanceTestInterfaceMethod11Request { param0: param0 }) | 2497 Ok(ConformanceTestInterfaceMethod6Request { param0: param0 }) |
| 2316 } | 2498 } |
| 2317 } | 2499 } |
| 2318 | 2500 |
| 2319 impl MojomEncodable for ConformanceTestInterfaceMethod11Request { | 2501 impl MojomEncodable for ConformanceTestInterfaceMethod6Request { |
| 2320 impl_encodable_for_pointer!(); | 2502 impl_encodable_for_pointer!(); |
| 2321 fn compute_size(&self, context: Context) -> usize { | 2503 fn compute_size(&self, context: Context) -> usize { |
| 2322 encoding::align_default(self.serialized_size(&context)) + | 2504 encoding::align_default(self.serialized_size(&context)) + |
| 2323 self.param0.compute_size(context.clone()) | 2505 self.param0.compute_size(context.clone()) |
| 2324 } | 2506 } |
| 2325 } | 2507 } |
| 2326 | 2508 |
| 2327 impl MojomStruct for ConformanceTestInterfaceMethod11Request {} | 2509 impl MojomStruct for ConformanceTestInterfaceMethod6Request {} |
| 2328 impl MojomMessage for ConformanceTestInterfaceMethod11Request { | 2510 impl MojomMessage for ConformanceTestInterfaceMethod6Request { |
| 2511 fn min_version() -> u32 { |
| 2512 ConformanceTestInterfaceMethod6::MIN_VERSION |
| 2513 } |
| 2329 fn create_header() -> MessageHeader { | 2514 fn create_header() -> MessageHeader { |
| 2330 MessageHeader::new(ConformanceTestInterface::VERSION, | 2515 MessageHeader::new(0, |
| 2331 ConformanceTestInterfaceMethod11::ORDINAL, | 2516 ConformanceTestInterfaceMethod6::ORDINAL, |
| 2332 message::MESSAGE_HEADER_NO_FLAG) | 2517 message::MESSAGE_HEADER_NO_FLAG) |
| 2333 | 2518 |
| 2334 } | 2519 } |
| 2335 } | 2520 } |
| 2336 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod11Request
{} | 2521 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod6Request
{} |
| 2337 | 2522 |
| 2338 /// Message: ConformanceTestInterfaceMethod12 | 2523 /// Message: ConformanceTestInterfaceMethod8 |
| 2339 pub mod ConformanceTestInterfaceMethod12 { | 2524 pub mod ConformanceTestInterfaceMethod8 { |
| 2340 pub const ORDINAL: u32 = 12; | 2525 pub const ORDINAL: u32 = 8; |
| 2341 pub const MIN_VERSION: u32 = 0; | 2526 pub const MIN_VERSION: u32 = 0; |
| 2342 } | 2527 } |
| 2343 // -- ConformanceTestInterfaceMethod12Request -- | 2528 // -- ConformanceTestInterfaceMethod8Request -- |
| 2344 | 2529 |
| 2345 // Constants | 2530 // Constants |
| 2346 // Enums | 2531 // Enums |
| 2347 // Struct version information | 2532 // Struct version information |
| 2348 const ConformanceTestInterfaceMethod12RequestVersions: [(u32, u32); 1] = [(0, 16
)]; | 2533 const ConformanceTestInterfaceMethod8RequestVersions: [(u32, u32); 1] = [(0, 16)
]; |
| 2349 | 2534 |
| 2350 // Struct definition | 2535 // Struct definition |
| 2351 pub struct ConformanceTestInterfaceMethod12Request { | 2536 pub struct ConformanceTestInterfaceMethod8Request { |
| 2352 pub param0: f32, | 2537 pub param0: Vec<Option<Vec<String>>>, |
| 2353 } | 2538 } |
| 2354 | 2539 |
| 2355 impl MojomPointer for ConformanceTestInterfaceMethod12Request { | 2540 impl MojomPointer for ConformanceTestInterfaceMethod8Request { |
| 2356 fn header_data(&self) -> DataHeaderValue { | 2541 fn header_data(&self) -> DataHeaderValue { |
| 2357 DataHeaderValue::Version(0) | 2542 DataHeaderValue::Version(0) |
| 2358 } | 2543 } |
| 2359 fn serialized_size(&self, _context: &Context) -> usize { | 2544 fn serialized_size(&self, _context: &Context) -> usize { |
| 2360 16 | 2545 16 |
| 2361 } | 2546 } |
| 2362 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2547 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2363 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2548 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2364 | 2549 |
| 2365 } | 2550 } |
| 2366 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2551 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2367 let version = { | 2552 let version = { |
| 2368 let mut state = decoder.get_mut(&context); | 2553 let mut state = decoder.get_mut(&context); |
| 2369 match state.decode_struct_header(&ConformanceTestInterfaceMethod12Re
questVersions) { | 2554 match state.decode_struct_header(&ConformanceTestInterfaceMethod8Req
uestVersions) { |
| 2370 Ok(header) => header.data(), | 2555 Ok(header) => header.data(), |
| 2371 Err(err) => return Err(err), | 2556 Err(err) => return Err(err), |
| 2372 } | 2557 } |
| 2373 }; | 2558 }; |
| 2374 let param0 = match <f32>::decode(decoder, context.clone()) { | 2559 let param0 = match <Vec<Option<Vec<String>>>>::decode(decoder, context.c
lone()) { |
| 2375 Ok(value) => value, | 2560 Ok(value) => value, |
| 2376 Err(err) => return Err(err), | 2561 Err(err) => return Err(err), |
| 2377 }; | 2562 }; |
| 2378 Ok(ConformanceTestInterfaceMethod12Request { param0: param0 }) | 2563 Ok(ConformanceTestInterfaceMethod8Request { param0: param0 }) |
| 2379 } | 2564 } |
| 2380 } | 2565 } |
| 2381 | 2566 |
| 2382 impl MojomEncodable for ConformanceTestInterfaceMethod12Request { | 2567 impl MojomEncodable for ConformanceTestInterfaceMethod8Request { |
| 2383 impl_encodable_for_pointer!(); | 2568 impl_encodable_for_pointer!(); |
| 2384 fn compute_size(&self, context: Context) -> usize { | 2569 fn compute_size(&self, context: Context) -> usize { |
| 2385 encoding::align_default(self.serialized_size(&context)) + | 2570 encoding::align_default(self.serialized_size(&context)) + |
| 2386 self.param0.compute_size(context.clone()) | 2571 self.param0.compute_size(context.clone()) |
| 2387 } | 2572 } |
| 2388 } | 2573 } |
| 2389 | 2574 |
| 2390 impl MojomStruct for ConformanceTestInterfaceMethod12Request {} | 2575 impl MojomStruct for ConformanceTestInterfaceMethod8Request {} |
| 2391 impl MojomMessage for ConformanceTestInterfaceMethod12Request { | 2576 impl MojomMessage for ConformanceTestInterfaceMethod8Request { |
| 2577 fn min_version() -> u32 { |
| 2578 ConformanceTestInterfaceMethod8::MIN_VERSION |
| 2579 } |
| 2392 fn create_header() -> MessageHeader { | 2580 fn create_header() -> MessageHeader { |
| 2393 MessageHeader::new(ConformanceTestInterface::VERSION, | 2581 MessageHeader::new(0, |
| 2394 ConformanceTestInterfaceMethod12::ORDINAL, | 2582 ConformanceTestInterfaceMethod8::ORDINAL, |
| 2395 message::MESSAGE_HEADER_EXPECT_RESPONSE) | 2583 message::MESSAGE_HEADER_NO_FLAG) |
| 2396 | 2584 |
| 2397 } | 2585 } |
| 2398 } | 2586 } |
| 2399 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod12Request
{} | 2587 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod8Request
{} |
| 2400 | 2588 |
| 2401 // -- ConformanceTestInterfaceMethod12Response -- | 2589 /// Message: ConformanceTestInterfaceMethod10 |
| 2590 pub mod ConformanceTestInterfaceMethod10 { |
| 2591 pub const ORDINAL: u32 = 10; |
| 2592 pub const MIN_VERSION: u32 = 0; |
| 2593 } |
| 2594 // -- ConformanceTestInterfaceMethod10Request -- |
| 2402 | 2595 |
| 2403 // Constants | 2596 // Constants |
| 2404 // Enums | 2597 // Enums |
| 2405 // Struct version information | 2598 // Struct version information |
| 2406 const ConformanceTestInterfaceMethod12ResponseVersions: [(u32, u32); 1] = [(0, 1
6)]; | 2599 const ConformanceTestInterfaceMethod10RequestVersions: [(u32, u32); 1] = [(0, 16
)]; |
| 2407 | 2600 |
| 2408 // Struct definition | 2601 // Struct definition |
| 2409 pub struct ConformanceTestInterfaceMethod12Response { | 2602 pub struct ConformanceTestInterfaceMethod10Request { |
| 2410 pub param0: f32, | 2603 pub param0: HashMap<String, u8>, |
| 2411 } | 2604 } |
| 2412 | 2605 |
| 2413 impl MojomPointer for ConformanceTestInterfaceMethod12Response { | 2606 impl MojomPointer for ConformanceTestInterfaceMethod10Request { |
| 2414 fn header_data(&self) -> DataHeaderValue { | 2607 fn header_data(&self) -> DataHeaderValue { |
| 2415 DataHeaderValue::Version(0) | 2608 DataHeaderValue::Version(0) |
| 2416 } | 2609 } |
| 2417 fn serialized_size(&self, _context: &Context) -> usize { | 2610 fn serialized_size(&self, _context: &Context) -> usize { |
| 2418 16 | 2611 16 |
| 2419 } | 2612 } |
| 2420 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2613 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2421 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2614 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2422 | 2615 |
| 2423 } | 2616 } |
| 2424 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2617 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2425 let version = { | 2618 let version = { |
| 2426 let mut state = decoder.get_mut(&context); | 2619 let mut state = decoder.get_mut(&context); |
| 2427 match state.decode_struct_header(&ConformanceTestInterfaceMethod12Re
sponseVersions) { | 2620 match state.decode_struct_header(&ConformanceTestInterfaceMethod10Re
questVersions) { |
| 2428 Ok(header) => header.data(), | 2621 Ok(header) => header.data(), |
| 2429 Err(err) => return Err(err), | 2622 Err(err) => return Err(err), |
| 2430 } | 2623 } |
| 2431 }; | 2624 }; |
| 2432 let param0 = match <f32>::decode(decoder, context.clone()) { | 2625 let param0 = match <HashMap<String, u8>>::decode(decoder, context.clone(
)) { |
| 2433 Ok(value) => value, | 2626 Ok(value) => value, |
| 2434 Err(err) => return Err(err), | 2627 Err(err) => return Err(err), |
| 2435 }; | 2628 }; |
| 2436 Ok(ConformanceTestInterfaceMethod12Response { param0: param0 }) | 2629 Ok(ConformanceTestInterfaceMethod10Request { param0: param0 }) |
| 2437 } | 2630 } |
| 2438 } | 2631 } |
| 2439 | 2632 |
| 2440 impl MojomEncodable for ConformanceTestInterfaceMethod12Response { | 2633 impl MojomEncodable for ConformanceTestInterfaceMethod10Request { |
| 2441 impl_encodable_for_pointer!(); | 2634 impl_encodable_for_pointer!(); |
| 2442 fn compute_size(&self, context: Context) -> usize { | 2635 fn compute_size(&self, context: Context) -> usize { |
| 2443 encoding::align_default(self.serialized_size(&context)) + | 2636 encoding::align_default(self.serialized_size(&context)) + |
| 2444 self.param0.compute_size(context.clone()) | 2637 self.param0.compute_size(context.clone()) |
| 2445 } | 2638 } |
| 2446 } | 2639 } |
| 2447 | 2640 |
| 2448 impl MojomStruct for ConformanceTestInterfaceMethod12Response {} | 2641 impl MojomStruct for ConformanceTestInterfaceMethod10Request {} |
| 2642 impl MojomMessage for ConformanceTestInterfaceMethod10Request { |
| 2643 fn min_version() -> u32 { |
| 2644 ConformanceTestInterfaceMethod10::MIN_VERSION |
| 2645 } |
| 2646 fn create_header() -> MessageHeader { |
| 2647 MessageHeader::new(0, |
| 2648 ConformanceTestInterfaceMethod10::ORDINAL, |
| 2649 message::MESSAGE_HEADER_NO_FLAG) |
| 2449 | 2650 |
| 2450 impl MojomMessage for ConformanceTestInterfaceMethod12Response { | |
| 2451 fn create_header() -> MessageHeader { | |
| 2452 MessageHeader::new(ConformanceTestInterface::VERSION, | |
| 2453 ConformanceTestInterfaceMethod12::ORDINAL, | |
| 2454 message::MESSAGE_HEADER_IS_RESPONSE) | |
| 2455 } | 2651 } |
| 2456 } | 2652 } |
| 2457 impl ConformanceTestInterfaceResponse for ConformanceTestInterfaceMethod12Reques
t {} | 2653 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod10Request
{} |
| 2458 /// Message: ConformanceTestInterfaceMethod14 | 2654 |
| 2459 pub mod ConformanceTestInterfaceMethod14 { | 2655 /// Message: ConformanceTestInterfaceMethod11 |
| 2460 pub const ORDINAL: u32 = 14; | 2656 pub mod ConformanceTestInterfaceMethod11 { |
| 2657 pub const ORDINAL: u32 = 11; |
| 2461 pub const MIN_VERSION: u32 = 0; | 2658 pub const MIN_VERSION: u32 = 0; |
| 2462 } | 2659 } |
| 2463 // -- ConformanceTestInterfaceMethod14Request -- | 2660 // -- ConformanceTestInterfaceMethod11Request -- |
| 2464 | 2661 |
| 2465 // Constants | 2662 // Constants |
| 2466 // Enums | 2663 // Enums |
| 2467 // Struct version information | 2664 // Struct version information |
| 2468 const ConformanceTestInterfaceMethod14RequestVersions: [(u32, u32); 1] = [(0, 24
)]; | 2665 const ConformanceTestInterfaceMethod11RequestVersions: [(u32, u32); 1] = [(0, 16
)]; |
| 2469 | 2666 |
| 2470 // Struct definition | 2667 // Struct definition |
| 2471 pub struct ConformanceTestInterfaceMethod14Request { | 2668 pub struct ConformanceTestInterfaceMethod11Request { |
| 2472 pub param0: UnionA, | 2669 pub param0: StructG, |
| 2473 } | 2670 } |
| 2474 | 2671 |
| 2475 impl MojomPointer for ConformanceTestInterfaceMethod14Request { | 2672 impl MojomPointer for ConformanceTestInterfaceMethod11Request { |
| 2476 fn header_data(&self) -> DataHeaderValue { | 2673 fn header_data(&self) -> DataHeaderValue { |
| 2477 DataHeaderValue::Version(0) | 2674 DataHeaderValue::Version(0) |
| 2478 } | 2675 } |
| 2479 fn serialized_size(&self, _context: &Context) -> usize { | 2676 fn serialized_size(&self, _context: &Context) -> usize { |
| 2480 24 | 2677 16 |
| 2481 } | 2678 } |
| 2482 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2679 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2483 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2680 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2484 | 2681 |
| 2485 } | 2682 } |
| 2486 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2683 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2487 let version = { | 2684 let version = { |
| 2488 let mut state = decoder.get_mut(&context); | 2685 let mut state = decoder.get_mut(&context); |
| 2489 match state.decode_struct_header(&ConformanceTestInterfaceMethod14Re
questVersions) { | 2686 match state.decode_struct_header(&ConformanceTestInterfaceMethod11Re
questVersions) { |
| 2490 Ok(header) => header.data(), | 2687 Ok(header) => header.data(), |
| 2491 Err(err) => return Err(err), | 2688 Err(err) => return Err(err), |
| 2492 } | 2689 } |
| 2493 }; | 2690 }; |
| 2494 let param0 = match <UnionA>::decode(decoder, context.clone()) { | 2691 let param0 = match <StructG>::decode(decoder, context.clone()) { |
| 2495 Ok(value) => value, | 2692 Ok(value) => value, |
| 2496 Err(err) => return Err(err), | 2693 Err(err) => return Err(err), |
| 2497 }; | 2694 }; |
| 2498 Ok(ConformanceTestInterfaceMethod14Request { param0: param0 }) | 2695 Ok(ConformanceTestInterfaceMethod11Request { param0: param0 }) |
| 2499 } | 2696 } |
| 2500 } | 2697 } |
| 2501 | 2698 |
| 2502 impl MojomEncodable for ConformanceTestInterfaceMethod14Request { | 2699 impl MojomEncodable for ConformanceTestInterfaceMethod11Request { |
| 2503 impl_encodable_for_pointer!(); | 2700 impl_encodable_for_pointer!(); |
| 2504 fn compute_size(&self, context: Context) -> usize { | 2701 fn compute_size(&self, context: Context) -> usize { |
| 2505 encoding::align_default(self.serialized_size(&context)) + | 2702 encoding::align_default(self.serialized_size(&context)) + |
| 2506 self.param0.compute_size(context.clone()) | 2703 self.param0.compute_size(context.clone()) |
| 2507 } | 2704 } |
| 2508 } | 2705 } |
| 2509 | 2706 |
| 2510 impl MojomStruct for ConformanceTestInterfaceMethod14Request {} | 2707 impl MojomStruct for ConformanceTestInterfaceMethod11Request {} |
| 2511 impl MojomMessage for ConformanceTestInterfaceMethod14Request { | 2708 impl MojomMessage for ConformanceTestInterfaceMethod11Request { |
| 2709 fn min_version() -> u32 { |
| 2710 ConformanceTestInterfaceMethod11::MIN_VERSION |
| 2711 } |
| 2512 fn create_header() -> MessageHeader { | 2712 fn create_header() -> MessageHeader { |
| 2513 MessageHeader::new(ConformanceTestInterface::VERSION, | 2713 MessageHeader::new(0, |
| 2514 ConformanceTestInterfaceMethod14::ORDINAL, | 2714 ConformanceTestInterfaceMethod11::ORDINAL, |
| 2515 message::MESSAGE_HEADER_NO_FLAG) | 2715 message::MESSAGE_HEADER_NO_FLAG) |
| 2516 | 2716 |
| 2517 } | 2717 } |
| 2518 } | 2718 } |
| 2519 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod14Request
{} | 2719 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod11Request
{} |
| 2520 | 2720 |
| 2521 /// Message: ConformanceTestInterfaceMethod0 | 2721 /// Message: ConformanceTestInterfaceMethod0 |
| 2522 pub mod ConformanceTestInterfaceMethod0 { | 2722 pub mod ConformanceTestInterfaceMethod0 { |
| 2523 pub const ORDINAL: u32 = 0; | 2723 pub const ORDINAL: u32 = 0; |
| 2524 pub const MIN_VERSION: u32 = 0; | 2724 pub const MIN_VERSION: u32 = 0; |
| 2525 } | 2725 } |
| 2526 // -- ConformanceTestInterfaceMethod0Request -- | 2726 // -- ConformanceTestInterfaceMethod0Request -- |
| 2527 | 2727 |
| 2528 // Constants | 2728 // Constants |
| 2529 // Enums | 2729 // Enums |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2565 impl MojomEncodable for ConformanceTestInterfaceMethod0Request { | 2765 impl MojomEncodable for ConformanceTestInterfaceMethod0Request { |
| 2566 impl_encodable_for_pointer!(); | 2766 impl_encodable_for_pointer!(); |
| 2567 fn compute_size(&self, context: Context) -> usize { | 2767 fn compute_size(&self, context: Context) -> usize { |
| 2568 encoding::align_default(self.serialized_size(&context)) + | 2768 encoding::align_default(self.serialized_size(&context)) + |
| 2569 self.param0.compute_size(context.clone()) | 2769 self.param0.compute_size(context.clone()) |
| 2570 } | 2770 } |
| 2571 } | 2771 } |
| 2572 | 2772 |
| 2573 impl MojomStruct for ConformanceTestInterfaceMethod0Request {} | 2773 impl MojomStruct for ConformanceTestInterfaceMethod0Request {} |
| 2574 impl MojomMessage for ConformanceTestInterfaceMethod0Request { | 2774 impl MojomMessage for ConformanceTestInterfaceMethod0Request { |
| 2775 fn min_version() -> u32 { |
| 2776 ConformanceTestInterfaceMethod0::MIN_VERSION |
| 2777 } |
| 2575 fn create_header() -> MessageHeader { | 2778 fn create_header() -> MessageHeader { |
| 2576 MessageHeader::new(ConformanceTestInterface::VERSION, | 2779 MessageHeader::new(0, |
| 2577 ConformanceTestInterfaceMethod0::ORDINAL, | 2780 ConformanceTestInterfaceMethod0::ORDINAL, |
| 2578 message::MESSAGE_HEADER_NO_FLAG) | 2781 message::MESSAGE_HEADER_NO_FLAG) |
| 2579 | 2782 |
| 2580 } | 2783 } |
| 2581 } | 2784 } |
| 2582 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod0Request
{} | 2785 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod0Request
{} |
| 2583 | 2786 |
| 2584 /// Message: ConformanceTestInterfaceMethod1 | 2787 /// Message: ConformanceTestInterfaceMethod9 |
| 2585 pub mod ConformanceTestInterfaceMethod1 { | 2788 pub mod ConformanceTestInterfaceMethod9 { |
| 2586 pub const ORDINAL: u32 = 1; | 2789 pub const ORDINAL: u32 = 9; |
| 2587 pub const MIN_VERSION: u32 = 0; | 2790 pub const MIN_VERSION: u32 = 0; |
| 2588 } | 2791 } |
| 2589 // -- ConformanceTestInterfaceMethod1Request -- | 2792 // -- ConformanceTestInterfaceMethod9Request -- |
| 2590 | 2793 |
| 2591 // Constants | 2794 // Constants |
| 2592 // Enums | 2795 // Enums |
| 2593 // Struct version information | 2796 // Struct version information |
| 2594 const ConformanceTestInterfaceMethod1RequestVersions: [(u32, u32); 1] = [(0, 16)
]; | 2797 const ConformanceTestInterfaceMethod9RequestVersions: [(u32, u32); 1] = [(0, 16)
]; |
| 2595 | 2798 |
| 2596 // Struct definition | 2799 // Struct definition |
| 2597 pub struct ConformanceTestInterfaceMethod1Request { | 2800 pub struct ConformanceTestInterfaceMethod9Request { |
| 2598 pub param0: StructA, | 2801 pub param0: Option<Vec<Vec<Option<system::UntypedHandle>>>>, |
| 2599 } | 2802 } |
| 2600 | 2803 |
| 2601 impl MojomPointer for ConformanceTestInterfaceMethod1Request { | 2804 impl MojomPointer for ConformanceTestInterfaceMethod9Request { |
| 2602 fn header_data(&self) -> DataHeaderValue { | 2805 fn header_data(&self) -> DataHeaderValue { |
| 2603 DataHeaderValue::Version(0) | 2806 DataHeaderValue::Version(0) |
| 2604 } | 2807 } |
| 2605 fn serialized_size(&self, _context: &Context) -> usize { | 2808 fn serialized_size(&self, _context: &Context) -> usize { |
| 2606 16 | 2809 16 |
| 2607 } | 2810 } |
| 2608 fn encode_value(self, encoder: &mut Encoder, context: Context) { | 2811 fn encode_value(self, encoder: &mut Encoder, context: Context) { |
| 2609 MojomEncodable::encode(self.param0, encoder, context.clone()); | 2812 MojomEncodable::encode(self.param0, encoder, context.clone()); |
| 2610 | 2813 |
| 2611 } | 2814 } |
| 2612 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | 2815 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { |
| 2613 let version = { | 2816 let version = { |
| 2614 let mut state = decoder.get_mut(&context); | 2817 let mut state = decoder.get_mut(&context); |
| 2615 match state.decode_struct_header(&ConformanceTestInterfaceMethod1Req
uestVersions) { | 2818 match state.decode_struct_header(&ConformanceTestInterfaceMethod9Req
uestVersions) { |
| 2616 Ok(header) => header.data(), | 2819 Ok(header) => header.data(), |
| 2617 Err(err) => return Err(err), | 2820 Err(err) => return Err(err), |
| 2618 } | 2821 } |
| 2619 }; | 2822 }; |
| 2620 let param0 = match <StructA>::decode(decoder, context.clone()) { | 2823 let param0 = match <Option<Vec<Vec<Option<system::UntypedHandle>>>>>::de
code(decoder, context.clone()) { |
| 2621 Ok(value) => value, | 2824 Ok(value) => value, |
| 2622 Err(err) => return Err(err), | 2825 Err(err) => return Err(err), |
| 2623 }; | 2826 }; |
| 2624 Ok(ConformanceTestInterfaceMethod1Request { param0: param0 }) | 2827 Ok(ConformanceTestInterfaceMethod9Request { param0: param0 }) |
| 2625 } | 2828 } |
| 2626 } | 2829 } |
| 2627 | 2830 |
| 2628 impl MojomEncodable for ConformanceTestInterfaceMethod1Request { | 2831 impl MojomEncodable for ConformanceTestInterfaceMethod9Request { |
| 2629 impl_encodable_for_pointer!(); | 2832 impl_encodable_for_pointer!(); |
| 2630 fn compute_size(&self, context: Context) -> usize { | 2833 fn compute_size(&self, context: Context) -> usize { |
| 2631 encoding::align_default(self.serialized_size(&context)) + | 2834 encoding::align_default(self.serialized_size(&context)) + |
| 2632 self.param0.compute_size(context.clone()) | 2835 self.param0.compute_size(context.clone()) |
| 2633 } | 2836 } |
| 2634 } | 2837 } |
| 2635 | 2838 |
| 2636 impl MojomStruct for ConformanceTestInterfaceMethod1Request {} | 2839 impl MojomStruct for ConformanceTestInterfaceMethod9Request {} |
| 2637 impl MojomMessage for ConformanceTestInterfaceMethod1Request { | 2840 impl MojomMessage for ConformanceTestInterfaceMethod9Request { |
| 2841 fn min_version() -> u32 { |
| 2842 ConformanceTestInterfaceMethod9::MIN_VERSION |
| 2843 } |
| 2638 fn create_header() -> MessageHeader { | 2844 fn create_header() -> MessageHeader { |
| 2639 MessageHeader::new(ConformanceTestInterface::VERSION, | 2845 MessageHeader::new(0, |
| 2640 ConformanceTestInterfaceMethod1::ORDINAL, | 2846 ConformanceTestInterfaceMethod9::ORDINAL, |
| 2641 message::MESSAGE_HEADER_NO_FLAG) | 2847 message::MESSAGE_HEADER_NO_FLAG) |
| 2642 | 2848 |
| 2643 } | 2849 } |
| 2644 } | 2850 } |
| 2645 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod1Request
{} | 2851 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod9Request
{} |
| 2646 | 2852 |
| 2647 /// Message: ConformanceTestInterfaceMethod13 | 2853 /// Message: ConformanceTestInterfaceMethod13 |
| 2648 pub mod ConformanceTestInterfaceMethod13 { | 2854 pub mod ConformanceTestInterfaceMethod13 { |
| 2649 pub const ORDINAL: u32 = 13; | 2855 pub const ORDINAL: u32 = 13; |
| 2650 pub const MIN_VERSION: u32 = 0; | 2856 pub const MIN_VERSION: u32 = 0; |
| 2651 } | 2857 } |
| 2652 // -- ConformanceTestInterfaceMethod13Request -- | 2858 // -- ConformanceTestInterfaceMethod13Request -- |
| 2653 | 2859 |
| 2654 // Constants | 2860 // Constants |
| 2655 // Enums | 2861 // Enums |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2709 fn compute_size(&self, context: Context) -> usize { | 2915 fn compute_size(&self, context: Context) -> usize { |
| 2710 encoding::align_default(self.serialized_size(&context)) + | 2916 encoding::align_default(self.serialized_size(&context)) + |
| 2711 self.param0.compute_size(context.clone()) + | 2917 self.param0.compute_size(context.clone()) + |
| 2712 self.param1.compute_size(context.clone()) + | 2918 self.param1.compute_size(context.clone()) + |
| 2713 self.param2.compute_size(context.clone()) | 2919 self.param2.compute_size(context.clone()) |
| 2714 } | 2920 } |
| 2715 } | 2921 } |
| 2716 | 2922 |
| 2717 impl MojomStruct for ConformanceTestInterfaceMethod13Request {} | 2923 impl MojomStruct for ConformanceTestInterfaceMethod13Request {} |
| 2718 impl MojomMessage for ConformanceTestInterfaceMethod13Request { | 2924 impl MojomMessage for ConformanceTestInterfaceMethod13Request { |
| 2925 fn min_version() -> u32 { |
| 2926 ConformanceTestInterfaceMethod13::MIN_VERSION |
| 2927 } |
| 2719 fn create_header() -> MessageHeader { | 2928 fn create_header() -> MessageHeader { |
| 2720 MessageHeader::new(ConformanceTestInterface::VERSION, | 2929 MessageHeader::new(0, |
| 2721 ConformanceTestInterfaceMethod13::ORDINAL, | 2930 ConformanceTestInterfaceMethod13::ORDINAL, |
| 2722 message::MESSAGE_HEADER_NO_FLAG) | 2931 message::MESSAGE_HEADER_NO_FLAG) |
| 2723 | 2932 |
| 2724 } | 2933 } |
| 2725 } | 2934 } |
| 2726 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod13Request
{} | 2935 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod13Request
{} |
| 2727 | 2936 |
| 2728 /// Message: ConformanceTestInterfaceMethod15 | |
| 2729 pub mod ConformanceTestInterfaceMethod15 { | |
| 2730 pub const ORDINAL: u32 = 15; | |
| 2731 pub const MIN_VERSION: u32 = 0; | |
| 2732 } | |
| 2733 // -- ConformanceTestInterfaceMethod15Request -- | |
| 2734 | |
| 2735 // Constants | |
| 2736 // Enums | |
| 2737 // Struct version information | |
| 2738 const ConformanceTestInterfaceMethod15RequestVersions: [(u32, u32); 1] = [(0, 16
)]; | |
| 2739 | |
| 2740 // Struct definition | |
| 2741 pub struct ConformanceTestInterfaceMethod15Request { | |
| 2742 pub param0: StructH, | |
| 2743 } | |
| 2744 | |
| 2745 impl MojomPointer for ConformanceTestInterfaceMethod15Request { | |
| 2746 fn header_data(&self) -> DataHeaderValue { | |
| 2747 DataHeaderValue::Version(0) | |
| 2748 } | |
| 2749 fn serialized_size(&self, _context: &Context) -> usize { | |
| 2750 16 | |
| 2751 } | |
| 2752 fn encode_value(self, encoder: &mut Encoder, context: Context) { | |
| 2753 MojomEncodable::encode(self.param0, encoder, context.clone()); | |
| 2754 | |
| 2755 } | |
| 2756 fn decode_value(decoder: &mut Decoder, context: Context) -> Result<Self, Val
idationError> { | |
| 2757 let version = { | |
| 2758 let mut state = decoder.get_mut(&context); | |
| 2759 match state.decode_struct_header(&ConformanceTestInterfaceMethod15Re
questVersions) { | |
| 2760 Ok(header) => header.data(), | |
| 2761 Err(err) => return Err(err), | |
| 2762 } | |
| 2763 }; | |
| 2764 let param0 = match <StructH>::decode(decoder, context.clone()) { | |
| 2765 Ok(value) => value, | |
| 2766 Err(err) => return Err(err), | |
| 2767 }; | |
| 2768 Ok(ConformanceTestInterfaceMethod15Request { param0: param0 }) | |
| 2769 } | |
| 2770 } | |
| 2771 | |
| 2772 impl MojomEncodable for ConformanceTestInterfaceMethod15Request { | |
| 2773 impl_encodable_for_pointer!(); | |
| 2774 fn compute_size(&self, context: Context) -> usize { | |
| 2775 encoding::align_default(self.serialized_size(&context)) + | |
| 2776 self.param0.compute_size(context.clone()) | |
| 2777 } | |
| 2778 } | |
| 2779 | |
| 2780 impl MojomStruct for ConformanceTestInterfaceMethod15Request {} | |
| 2781 impl MojomMessage for ConformanceTestInterfaceMethod15Request { | |
| 2782 fn create_header() -> MessageHeader { | |
| 2783 MessageHeader::new(ConformanceTestInterface::VERSION, | |
| 2784 ConformanceTestInterfaceMethod15::ORDINAL, | |
| 2785 message::MESSAGE_HEADER_NO_FLAG) | |
| 2786 | |
| 2787 } | |
| 2788 } | |
| 2789 impl ConformanceTestInterfaceRequest for ConformanceTestInterfaceMethod15Request
{} | |
| 2790 | |
| 2791 | 2937 |
| 2792 // --- IntegrationTestInterface --- | 2938 // --- IntegrationTestInterface --- |
| 2793 | 2939 |
| 2794 pub mod IntegrationTestInterface { | 2940 pub mod IntegrationTestInterface { |
| 2795 pub const SERVICE_NAME: &'static str = ""; | 2941 pub const SERVICE_NAME: &'static str = ""; |
| 2796 pub const VERSION: u32 = 0; | 2942 pub const VERSION: u32 = 0; |
| 2797 } | 2943 } |
| 2798 | 2944 |
| 2799 pub struct IntegrationTestInterfaceClient { | 2945 pub struct IntegrationTestInterfaceClient { |
| 2800 pipe: message_pipe::MessageEndpoint, | 2946 pipe: message_pipe::MessageEndpoint, |
| 2947 version: u32, |
| 2801 } | 2948 } |
| 2802 | 2949 |
| 2803 impl IntegrationTestInterfaceClient { | 2950 impl IntegrationTestInterfaceClient { |
| 2804 pub fn new(pipe: message_pipe::MessageEndpoint) -> IntegrationTestInterfaceC
lient { | 2951 pub fn new(pipe: message_pipe::MessageEndpoint) -> IntegrationTestInterfaceC
lient { |
| 2805 IntegrationTestInterfaceClient { pipe: pipe } | 2952 IntegrationTestInterfaceClient { |
| 2953 pipe: pipe, |
| 2954 version: IntegrationTestInterface::VERSION, |
| 2955 } |
| 2806 } | 2956 } |
| 2807 } | 2957 pub fn with_version(pipe: message_pipe::MessageEndpoint, |
| 2808 | 2958 version: u32) |
| 2809 impl CastHandle for IntegrationTestInterfaceClient { | 2959 -> IntegrationTestInterfaceClient { |
| 2810 unsafe fn from_untyped(handle: system::UntypedHandle) -> IntegrationTestInte
rfaceClient { | 2960 IntegrationTestInterfaceClient { |
| 2811 IntegrationTestInterfaceClient { pipe: message_pipe::MessageEndpoint::fr
om_untyped(handle) } | 2961 pipe: pipe, |
| 2962 version: version, |
| 2963 } |
| 2812 } | 2964 } |
| 2813 fn as_untyped(self) -> system::UntypedHandle { | |
| 2814 self.pipe.as_untyped() | |
| 2815 } | |
| 2816 } | |
| 2817 | |
| 2818 impl MojomEncodable for IntegrationTestInterfaceClient { | |
| 2819 impl_encodable_for_interface!(); | |
| 2820 } | 2965 } |
| 2821 | 2966 |
| 2822 impl MojomInterface for IntegrationTestInterfaceClient { | 2967 impl MojomInterface for IntegrationTestInterfaceClient { |
| 2823 fn service_name() -> &'static str { | 2968 fn service_name() -> &'static str { |
| 2824 IntegrationTestInterface::SERVICE_NAME | 2969 IntegrationTestInterface::SERVICE_NAME |
| 2825 } | 2970 } |
| 2826 fn version() -> u32 { | 2971 fn version(&self) -> u32 { |
| 2827 IntegrationTestInterface::VERSION | 2972 self.version |
| 2828 } | 2973 } |
| 2829 fn pipe(&self) -> &message_pipe::MessageEndpoint { | 2974 fn pipe(&self) -> &message_pipe::MessageEndpoint { |
| 2830 &self.pipe | 2975 &self.pipe |
| 2831 } | 2976 } |
| 2832 fn unwrap(self) -> message_pipe::MessageEndpoint { | 2977 fn unwrap(self) -> message_pipe::MessageEndpoint { |
| 2833 self.pipe | 2978 self.pipe |
| 2834 } | 2979 } |
| 2835 } | 2980 } |
| 2836 | 2981 |
| 2982 impl CastHandle for IntegrationTestInterfaceClient { |
| 2983 unsafe fn from_untyped(handle: system::UntypedHandle) -> IntegrationTestInte
rfaceClient { |
| 2984 IntegrationTestInterfaceClient { |
| 2985 pipe: message_pipe::MessageEndpoint::from_untyped(handle), |
| 2986 version: 0, // Since we have no other information, assume its the ba
se |
| 2987 } |
| 2988 } |
| 2989 fn as_untyped(self) -> system::UntypedHandle { |
| 2990 self.pipe.as_untyped() |
| 2991 } |
| 2992 } |
| 2993 |
| 2994 impl MojomEncodable for IntegrationTestInterfaceClient { |
| 2995 impl_encodable_for_interface!(); |
| 2996 } |
| 2997 |
| 2837 impl<R: IntegrationTestInterfaceRequest> MojomInterfaceSend<R> for IntegrationTe
stInterfaceClient {} | 2998 impl<R: IntegrationTestInterfaceRequest> MojomInterfaceSend<R> for IntegrationTe
stInterfaceClient {} |
| 2838 impl MojomInterfaceRecv for IntegrationTestInterfaceClient { | 2999 impl MojomInterfaceRecv for IntegrationTestInterfaceClient { |
| 2839 type Container = IntegrationTestInterfaceResponseOption; | 3000 type Container = IntegrationTestInterfaceResponseOption; |
| 2840 } | 3001 } |
| 2841 | 3002 |
| 2842 pub struct IntegrationTestInterfaceServer { | 3003 pub struct IntegrationTestInterfaceServer { |
| 2843 pipe: message_pipe::MessageEndpoint, | 3004 pipe: message_pipe::MessageEndpoint, |
| 3005 version: u32, |
| 2844 } | 3006 } |
| 2845 | 3007 |
| 2846 impl IntegrationTestInterfaceServer { | 3008 impl IntegrationTestInterfaceServer { |
| 2847 pub fn new(pipe: message_pipe::MessageEndpoint) -> IntegrationTestInterfaceS
erver { | 3009 pub fn new(pipe: message_pipe::MessageEndpoint) -> IntegrationTestInterfaceS
erver { |
| 2848 IntegrationTestInterfaceServer { pipe: pipe } | 3010 IntegrationTestInterfaceServer { |
| 3011 pipe: pipe, |
| 3012 version: IntegrationTestInterface::VERSION, |
| 3013 } |
| 2849 } | 3014 } |
| 2850 } | 3015 pub fn with_version(pipe: message_pipe::MessageEndpoint, |
| 2851 | 3016 version: u32) |
| 2852 impl CastHandle for IntegrationTestInterfaceServer { | 3017 -> IntegrationTestInterfaceServer { |
| 2853 unsafe fn from_untyped(handle: system::UntypedHandle) -> IntegrationTestInte
rfaceServer { | 3018 IntegrationTestInterfaceServer { |
| 2854 IntegrationTestInterfaceServer { pipe: message_pipe::MessageEndpoint::fr
om_untyped(handle) } | 3019 pipe: pipe, |
| 3020 version: version, |
| 3021 } |
| 2855 } | 3022 } |
| 2856 fn as_untyped(self) -> system::UntypedHandle { | |
| 2857 self.pipe.as_untyped() | |
| 2858 } | |
| 2859 } | |
| 2860 | |
| 2861 impl MojomEncodable for IntegrationTestInterfaceServer { | |
| 2862 impl_encodable_for_interface!(); | |
| 2863 } | 3023 } |
| 2864 | 3024 |
| 2865 impl MojomInterface for IntegrationTestInterfaceServer { | 3025 impl MojomInterface for IntegrationTestInterfaceServer { |
| 2866 fn service_name() -> &'static str { | 3026 fn service_name() -> &'static str { |
| 2867 IntegrationTestInterface::SERVICE_NAME | 3027 IntegrationTestInterface::SERVICE_NAME |
| 2868 } | 3028 } |
| 2869 fn version() -> u32 { | 3029 fn version(&self) -> u32 { |
| 2870 IntegrationTestInterface::VERSION | 3030 self.version |
| 2871 } | 3031 } |
| 2872 fn pipe(&self) -> &message_pipe::MessageEndpoint { | 3032 fn pipe(&self) -> &message_pipe::MessageEndpoint { |
| 2873 &self.pipe | 3033 &self.pipe |
| 2874 } | 3034 } |
| 2875 fn unwrap(self) -> message_pipe::MessageEndpoint { | 3035 fn unwrap(self) -> message_pipe::MessageEndpoint { |
| 2876 self.pipe | 3036 self.pipe |
| 2877 } | 3037 } |
| 2878 } | 3038 } |
| 2879 | 3039 |
| 3040 impl CastHandle for IntegrationTestInterfaceServer { |
| 3041 unsafe fn from_untyped(handle: system::UntypedHandle) -> IntegrationTestInte
rfaceServer { |
| 3042 IntegrationTestInterfaceServer { |
| 3043 pipe: message_pipe::MessageEndpoint::from_untyped(handle), |
| 3044 version: 0, // Since we have no other information, assume its the ba
se |
| 3045 } |
| 3046 } |
| 3047 fn as_untyped(self) -> system::UntypedHandle { |
| 3048 self.pipe.as_untyped() |
| 3049 } |
| 3050 } |
| 3051 |
| 3052 impl MojomEncodable for IntegrationTestInterfaceServer { |
| 3053 impl_encodable_for_interface!(); |
| 3054 } |
| 3055 |
| 2880 impl<R: IntegrationTestInterfaceResponse> MojomInterfaceSend<R> for IntegrationT
estInterfaceServer {} | 3056 impl<R: IntegrationTestInterfaceResponse> MojomInterfaceSend<R> for IntegrationT
estInterfaceServer {} |
| 2881 impl MojomInterfaceRecv for IntegrationTestInterfaceServer { | 3057 impl MojomInterfaceRecv for IntegrationTestInterfaceServer { |
| 2882 type Container = IntegrationTestInterfaceRequestOption; | 3058 type Container = IntegrationTestInterfaceRequestOption; |
| 2883 } | 3059 } |
| 2884 | 3060 |
| 2885 // Enums | 3061 // Enums |
| 2886 | 3062 |
| 2887 | 3063 |
| 2888 // Constants | 3064 // Constants |
| 2889 | 3065 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2986 impl MojomEncodable for IntegrationTestInterfaceMethod0Request { | 3162 impl MojomEncodable for IntegrationTestInterfaceMethod0Request { |
| 2987 impl_encodable_for_pointer!(); | 3163 impl_encodable_for_pointer!(); |
| 2988 fn compute_size(&self, context: Context) -> usize { | 3164 fn compute_size(&self, context: Context) -> usize { |
| 2989 encoding::align_default(self.serialized_size(&context)) + | 3165 encoding::align_default(self.serialized_size(&context)) + |
| 2990 self.param0.compute_size(context.clone()) | 3166 self.param0.compute_size(context.clone()) |
| 2991 } | 3167 } |
| 2992 } | 3168 } |
| 2993 | 3169 |
| 2994 impl MojomStruct for IntegrationTestInterfaceMethod0Request {} | 3170 impl MojomStruct for IntegrationTestInterfaceMethod0Request {} |
| 2995 impl MojomMessage for IntegrationTestInterfaceMethod0Request { | 3171 impl MojomMessage for IntegrationTestInterfaceMethod0Request { |
| 3172 fn min_version() -> u32 { |
| 3173 IntegrationTestInterfaceMethod0::MIN_VERSION |
| 3174 } |
| 2996 fn create_header() -> MessageHeader { | 3175 fn create_header() -> MessageHeader { |
| 2997 MessageHeader::new(IntegrationTestInterface::VERSION, | 3176 MessageHeader::new(1, |
| 2998 IntegrationTestInterfaceMethod0::ORDINAL, | 3177 IntegrationTestInterfaceMethod0::ORDINAL, |
| 2999 message::MESSAGE_HEADER_EXPECT_RESPONSE) | 3178 message::MESSAGE_HEADER_EXPECT_RESPONSE) |
| 3000 | 3179 |
| 3001 } | 3180 } |
| 3002 } | 3181 } |
| 3003 impl IntegrationTestInterfaceRequest for IntegrationTestInterfaceMethod0Request
{} | 3182 impl IntegrationTestInterfaceRequest for IntegrationTestInterfaceMethod0Request
{} |
| 3004 | 3183 |
| 3005 // -- IntegrationTestInterfaceMethod0Response -- | 3184 // -- IntegrationTestInterfaceMethod0Response -- |
| 3006 | 3185 |
| 3007 // Constants | 3186 // Constants |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3045 impl_encodable_for_pointer!(); | 3224 impl_encodable_for_pointer!(); |
| 3046 fn compute_size(&self, context: Context) -> usize { | 3225 fn compute_size(&self, context: Context) -> usize { |
| 3047 encoding::align_default(self.serialized_size(&context)) + | 3226 encoding::align_default(self.serialized_size(&context)) + |
| 3048 self.param0.compute_size(context.clone()) | 3227 self.param0.compute_size(context.clone()) |
| 3049 } | 3228 } |
| 3050 } | 3229 } |
| 3051 | 3230 |
| 3052 impl MojomStruct for IntegrationTestInterfaceMethod0Response {} | 3231 impl MojomStruct for IntegrationTestInterfaceMethod0Response {} |
| 3053 | 3232 |
| 3054 impl MojomMessage for IntegrationTestInterfaceMethod0Response { | 3233 impl MojomMessage for IntegrationTestInterfaceMethod0Response { |
| 3234 fn min_version() -> u32 { |
| 3235 IntegrationTestInterfaceMethod0::MIN_VERSION |
| 3236 } |
| 3055 fn create_header() -> MessageHeader { | 3237 fn create_header() -> MessageHeader { |
| 3056 MessageHeader::new(IntegrationTestInterface::VERSION, | 3238 MessageHeader::new(1, |
| 3057 IntegrationTestInterfaceMethod0::ORDINAL, | 3239 IntegrationTestInterfaceMethod0::ORDINAL, |
| 3058 message::MESSAGE_HEADER_IS_RESPONSE) | 3240 message::MESSAGE_HEADER_IS_RESPONSE) |
| 3059 } | 3241 } |
| 3060 } | 3242 } |
| 3061 impl IntegrationTestInterfaceResponse for IntegrationTestInterfaceMethod0Request
{} | 3243 impl IntegrationTestInterfaceResponse for IntegrationTestInterfaceMethod0Respons
e {} |
| OLD | NEW |