Apply the fields common to every builder's `build()` method onto `base`: optional status, optional message, device info, and container info.
(
&self,
base: &mut BaseEventData,
status: Option<StatusId>,
message: Option<String>,
)
| 235 | /// Apply the fields common to every builder's `build()` method onto `base`: |
| 236 | /// optional status, optional message, device info, and container info. |
| 237 | pub fn apply_common_fields( |
| 238 | &self, |
| 239 | base: &mut BaseEventData, |
| 240 | status: Option<StatusId>, |
| 241 | message: Option<String>, |
| 242 | ) { |
| 243 | if let Some(s) = status { |
| 244 | base.set_status(s); |
| 245 | } |
| 246 | if let Some(m) = message { |
| 247 | base.set_message(m); |
| 248 | } |
| 249 | base.set_device(self.device()); |
| 250 | base.set_container(self.container()); |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | #[cfg(test)] |
no test coverage detected