Function wasmcloud_core::wit::parse_wit_meta_from_operation

source ·
pub fn parse_wit_meta_from_operation(
    operation: impl AsRef<str>,
) -> Result<(WitNamespace, WitPackage, WitInterface, Option<WitFunction>)>
Expand description

Parse a sufficiently specified WIT operation/method into constituent parts.

§Errors

Returns Err if the operation is not of the form “<package>:<ns>/<interface>.<function>”

§Example

let (wit_ns, wit_pkg, wit_iface, wit_fn) = parse_wit_meta_from_operation("wasmcloud:bus/guest-config").unwrap();
let (wit_ns, wit_pkg, wit_iface, wit_fn) = parse_wit_meta_from_operation("wasmcloud:bus/guest-config.get").unwrap();