pub struct Options {
pub out: Option<Box<dyn Write + Send>>,
pub err_out: Option<Box<dyn Write + Send>>,
pub format: Option<String>,
pub format_from_flag: bool,
pub format_interactive: Option<String>,
pub format_piped: Option<String>,
pub interactive: Option<bool>,
}Expand description
嵌入场景的前端级配置(零值保持 stdout/stderr)。
Fields§
§out: Option<Box<dyn Write + Send>>§err_out: Option<Box<dyn Write + Send>>§format: Option<String>默认输出格式(–xyz.format / Config.Format;None/空=auto)。
format_from_flag: boolformat 来自命令行 –xyz.format(命令行层)。
format_interactive: Option<String>auto 的交互式下半(空= text)。
format_piped: Option<String>auto 的非交互下半(空= jsonl)。
interactive: Option<bool>强制交互式裁定(测试/嵌入用;None=按输出目标探测)。
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Options
impl !Sync for Options
impl !UnwindSafe for Options
impl Freeze for Options
impl Send for Options
impl Unpin for Options
impl UnsafeUnpin for Options
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more