pub struct ActivationReport {
pub mode: ActivationMode,
pub availability: Availability,
pub location: Option<PathBuf>,
pub reason: Option<String>,
pub next_step: Option<String>,
}Expand description
Structured activation status for an installed completion.
Use this report to decide whether to tell the user “ready now”, “open a new shell”, “source your rc file”, or “finish setup manually”.
§Examples
use shellcomp::{ActivationMode, Availability};
let mode = ActivationMode::ManagedRcBlock;
let availability = Availability::AvailableAfterSource;
assert_eq!(mode, ActivationMode::ManagedRcBlock);
assert_eq!(availability, Availability::AvailableAfterSource);Fields§
§mode: ActivationModeActivation mechanism in use.
availability: AvailabilityCurrent or expected availability state.
Interpret this together with ActivationReport::mode. For example,
ActivationMode::ManagedRcBlock plus Availability::AvailableAfterSource means the
completion wiring is present but the current shell session may still need source ~/.bashrc
or source ~/.zshrc.
location: Option<PathBuf>Shell-specific location related to activation.
For system-loader or native-directory activation this is often the completion file path. For managed startup wiring it is typically the startup file path.
reason: Option<String>Machine-readable operations use enums; this field carries human-readable context.
next_step: Option<String>Suggested next step for callers to render directly or adapt.
Trait Implementations§
Source§impl Clone for ActivationReport
impl Clone for ActivationReport
Source§fn clone(&self) -> ActivationReport
fn clone(&self) -> ActivationReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more