Config

Struct Config 

Source
pub struct Config {
    pub output: Option<String>,
    pub filter: Option<Vec<String>>,
    pub ignore: Option<Vec<String>>,
    pub line_numbers: Option<bool>,
    pub preview: Option<bool>,
    pub token_count: Option<bool>,
    pub output_folder: Option<String>,
    pub timestamped_output: Option<bool>,
    pub yes: Option<bool>,
    pub auto_diff: Option<bool>,
    pub diff_context_lines: Option<usize>,
    pub diff_only: Option<bool>,
}
Expand description

Global configuration loaded from .context-builder.toml.

Any field left as None means “use the CLI default / do not override”. Command-line arguments always take precedence over values provided here.

Example .context-builder.toml:

output = "context.md"
output_folder = "docs"
timestamped_output = true
auto_diff = true
diff_only = true         # Emit only change summary + modified file diffs (no full file bodies)
filter = ["rs", "toml"]
ignore = ["target", ".git"]
line_numbers = false
diff_context_lines = 5

Fields§

§output: Option<String>

Output file name (or base name when timestamped_output = true)

§filter: Option<Vec<String>>

File extensions to include (no leading dot, e.g. rs, toml)

§ignore: Option<Vec<String>>

File / directory names to ignore (exact name matches)

§line_numbers: Option<bool>

Add line numbers to code blocks

§preview: Option<bool>

Preview only the file tree (no file output)

§token_count: Option<bool>

Token counting mode

§output_folder: Option<String>

Optional folder to place the generated output file(s) in

§timestamped_output: Option<bool>

If true, append a UTC timestamp to the output file name (before extension)

§yes: Option<bool>

Assume “yes” for overwrite / processing confirmations

§auto_diff: Option<bool>

Enable automatic diff generation (requires timestamped_output = true)

§diff_context_lines: Option<usize>

Override number of unified diff context lines (falls back to env or default = 3)

§diff_only: Option<bool>

When true, emit ONLY:

  • Header + file tree
  • Change Summary
  • Per-file diffs for modified files

Excludes full file contents section entirely. Added files appear only in the change summary (and are marked Added) but their full content is omitted.

Trait Implementations§

Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Config

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Config

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,