pub struct OutputConfig {
pub json: bool,
pub quiet: bool,
}Fields§
§json: bool§quiet: boolImplementations§
Source§impl OutputConfig
impl OutputConfig
Sourcepub fn new(json_flag: bool, quiet: bool) -> Self
pub fn new(json_flag: bool, quiet: bool) -> Self
Build from --json / --quiet flags. JSON is forced on when stdout is not a TTY.
Sourcepub fn print_data(&self, data: &str)
pub fn print_data(&self, data: &str)
Print one line of data to stdout.
Sourcepub fn print_message(&self, msg: &str)
pub fn print_message(&self, msg: &str)
Print informational message to stderr; suppressed by –quiet.
Sourcepub fn print_required_prompt(&self, msg: &str)
pub fn print_required_prompt(&self, msg: &str)
Print an interactive prompt that the user MUST see to proceed.
Device-code prompts (verification URL, user code) are interactive
instructions, not optional status messages. They are emitted
unconditionally to stderr regardless of --quiet or --json.
Stderr is used even in --json mode to keep the JSON stdout stream
clean and parseable by agents.
Sourcepub fn print_json(&self, value: &Value)
pub fn print_json(&self, value: &Value)
Print serialized JSON to stdout.
Sourcepub fn render_error(&self, err: &CliError) -> i32
pub fn render_error(&self, err: &CliError) -> i32
Render an error per the spec contract:
- JSON mode: emit
{"error": {...}}to stdout (deliberate divergence from jira-cli — agents parsing stdout get a structured error). - Plain mode: emit the message to stderr.
Returns the exit code the caller should use.
Trait Implementations§
Source§impl Clone for OutputConfig
impl Clone for OutputConfig
Source§fn clone(&self) -> OutputConfig
fn clone(&self) -> OutputConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputConfig
impl Debug for OutputConfig
impl Copy for OutputConfig
Auto Trait Implementations§
impl Freeze for OutputConfig
impl RefUnwindSafe for OutputConfig
impl Send for OutputConfig
impl Sync for OutputConfig
impl Unpin for OutputConfig
impl UnsafeUnpin for OutputConfig
impl UnwindSafe for OutputConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more