MCPcopy Create free account
hub / github.com/PowerShell/DSC / get_adapter_input_kind

Function get_adapter_input_kind

lib/dsc-lib/src/dscresources/dscresource.rs:620–625  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

618/// # Errors
619/// * `DscError` - The adapter manifest is not found or invalid
620pub 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

Callers 7

add_metadataFunction · 0.85

Calls 1

OperationEnum · 0.50

Tested by

no test coverage detected