#[non_exhaustive]pub enum Preset {
Normal,
Minimal,
Bare,
Custom(Vec<String>),
}Expand description
Preset defines the base set of CLI flags injected before
builder attributes and extra_args.
§Examples
use claude_code::Preset;
// Reusable custom preset
let my_preset = Preset::Custom(vec![
"--print".into(),
"--no-session-persistence".into(),
]);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Normal
All context-minimization defaults (current behavior).
Injects: --print, --no-session-persistence, --strict-mcp-config,
--disable-slash-commands, --setting-sources "", --mcp-config '{}',
--tools "", --system-prompt "".
Minimal
Only flags required for the library’s parsing to work.
Injects: --print. Format flags (--output-format, --verbose)
are added by to_args() / to_stream_args() regardless of preset.
Bare
No auto-injected flags. User has full control via builder attributes
and extra_args.
Custom(Vec<String>)
User-defined base args. These are injected before builder attributes
and extra_args.
Trait Implementations§
impl StructuralPartialEq for Preset
Auto Trait Implementations§
impl Freeze for Preset
impl RefUnwindSafe for Preset
impl Send for Preset
impl Sync for Preset
impl Unpin for Preset
impl UnsafeUnpin for Preset
impl UnwindSafe for Preset
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