Skip to main content

HintContext

Struct HintContext 

Source
pub struct HintContext {
Show 23 fields pub source: HintSource, pub dir: Option<String>, pub glob: Vec<String>, pub format: Option<String>, pub hints: bool, pub fields: Vec<String>, pub sort: Option<String>, pub has_limit: bool, pub has_body_search: bool, pub body_pattern: Option<String>, pub has_regex_search: bool, pub property_filters: Vec<String>, pub tag_filters: Vec<String>, pub task_filter: Option<String>, pub file_targets: Vec<String>, pub section_filters: Vec<String>, pub view_name: Option<String>, pub task_selector: Option<String>, pub dry_run: bool, pub index_path: Option<String>, pub auto_link_file: Option<String>, pub auto_link_min_length: Option<usize>, pub auto_link_exclude_titles: Vec<String>,
}
Expand description

Global flags to propagate into generated hint commands.

Each Option field is Some only when the user passed the flag explicitly on the CLI. Values that came from .hyalo.toml config are omitted so that the copy-pasted hint command inherits the same config automatically.

Fields§

§source: HintSource§dir: Option<String>

None means “.” (default) or came from config — omit from hints.

§glob: Vec<String>§format: Option<String>

Explicit --format from CLI (not from config).

§hints: bool

Explicit --hints from CLI (not from config).

§fields: Vec<String>§sort: Option<String>§has_limit: bool§has_body_search: bool§body_pattern: Option<String>

The actual body-search pattern string, when a body search was issued.

§has_regex_search: bool§property_filters: Vec<String>§tag_filters: Vec<String>§task_filter: Option<String>§file_targets: Vec<String>§section_filters: Vec<String>§view_name: Option<String>

Set when the query was produced by --view <name>; suppresses the “save as view” hint to avoid suggesting the user save a view they already have.

§task_selector: Option<String>

Task selector used: “all”, “section:”, or “lines” (for multi-line). None means single-line or no task context.

§dry_run: bool§index_path: Option<String>§auto_link_file: Option<String>§auto_link_min_length: Option<usize>§auto_link_exclude_titles: Vec<String>

Implementations§

Source§

impl HintContext

Source

pub fn new(source: HintSource) -> Self

Source

pub fn from_common(source: HintSource, common: &CommonHintFlags) -> Self

Construct a HintContext with the common global flags pre-populated.

Equivalent to calling new(source) followed by assigning dir, format, and hints — extracted here so every match arm in run.rs does not repeat those three lines.

Auto Trait Implementations§

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.