Gets the input kind for an adapter resource # Arguments `adapter` - The adapter resource to get the input kind for # Returns `Result ` - The input kind of the adapter or an error if not found # Errors `DscError` - The adapter manifest is not found or invalid
(adapter: &DscResource)
| 618 | /// # Errors |
| 619 | /// * `DscError` - The adapter manifest is not found or invalid |
| 620 | pub fn get_adapter_input_kind(adapter: &DscResource) -> Result<AdapterInputKind, DscError> { |
| 621 | if let Some(manifest) = &adapter.manifest && let Some(adapter_operation) = &manifest.adapter { |
| 622 | return Ok(adapter_operation.input_kind.clone()); |
| 623 | } |
| 624 | Err(DscError::Operation(t!("dscresources.dscresource.adapterManifestNotFound", adapter = adapter.type_name).to_string())) |
| 625 | } |
| 626 | |
| 627 | #[must_use] |
| 628 | /// Performs a comparison of two JSON Values if the expected is a strict subset of the actual |
no test coverage detected