use serde::{Deserialize, Serialize};
use super::CommandOutput;
use crate::{
HookLifecycle, HookName, OptionName, OptionScopeSelector, ScopeSelector, SetOptionMode,
};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SetOptionResponse {
pub scope: ScopeSelector,
pub option: OptionName,
pub mode: SetOptionMode,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SetOptionByNameResponse {
pub scope: OptionScopeSelector,
pub name: String,
pub mode: SetOptionMode,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SetEnvironmentResponse {
pub scope: ScopeSelector,
pub name: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SetHookResponse {
pub scope: ScopeSelector,
pub hook: HookName,
pub lifecycle: HookLifecycle,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ShowOptionsResponse {
pub scope: OptionScopeSelector,
pub output: CommandOutput,
}
impl ShowOptionsResponse {
#[must_use]
pub fn command_output(&self) -> &CommandOutput {
&self.output
}
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ShowEnvironmentResponse {
pub scope: ScopeSelector,
pub output: CommandOutput,
}
impl ShowEnvironmentResponse {
#[must_use]
pub fn command_output(&self) -> &CommandOutput {
&self.output
}
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ShowHooksResponse {
pub scope: ScopeSelector,
pub output: CommandOutput,
}
impl ShowHooksResponse {
#[must_use]
pub fn command_output(&self) -> &CommandOutput {
&self.output
}
}