Skip to main content

dispatch_command

Function dispatch_command 

Source
pub unsafe fn dispatch_command(
    plugin: &dyn PackageManager,
    project_root: PmpxStr,
    matched: *const PmpxStr,
    matched_len: usize,
    verb: u32,
    args: *const PmpxStr,
    args_len: usize,
    out: *mut PmpxCommand,
) -> u32
Expand description

All the wiring of one command call: read the inputs, call crate::PackageManager::command, write the output. This logic lives here rather than in the export! macro so that it can be tested directly.

ยงSafety

See the Safety section of PmpxPluginV1::command. In addition, plugin must be a valid instance in this process.