Skip to main content

parse_lifecycle_request

Function parse_lifecycle_request 

Source
pub fn parse_lifecycle_request(
    args: impl IntoIterator<Item = OsString>,
) -> Result<Option<LifecycleRequest>, LifecycleRequestError>
Expand description

Parse __ready, __set, or __go from a plugin argv iterator.

Returns Ok(None) when the first non-program argument is not a lifecycle protocol command, so the plugin can continue with normal CLI parsing.

ยงErrors

Returns LifecycleRequestError when a lifecycle protocol command is present but missing its required capability argument or, for __ready, includes extra arguments.