pub struct Cli {
pub max_concurrency: Option<usize>,
pub wait_lock: Option<u64>,
pub skip_memory_guard: bool,
pub lang: Option<Language>,
pub tz: Option<Tz>,
pub command: Commands,
}Fields§
§max_concurrency: Option<usize>Número máximo de invocações CLI simultâneas permitidas (default: 4).
Limita o semáforo de contagem de slots de concorrência. O valor é restrito ao intervalo [1, 2×nCPUs]. Valores acima do teto são rejeitados com exit 2.
wait_lock: Option<u64>Aguardar até SECONDS por um slot livre antes de desistir (exit 75).
Útil em pipelines de agentes que fazem retry: a instância faz polling a cada 500 ms até o timeout ou um slot abrir. Default: 300s (5 minutos).
skip_memory_guard: boolPular a verificação de memória disponível antes de carregar o modelo.
Uso exclusivo em testes automatizados onde a alocação real não ocorre.
lang: Option<Language>Idioma das mensagens humanas (stderr). Aceita en ou pt.
Sem a flag, detecta via env SQLITE_GRAPHRAG_LANG e depois LC_ALL/LANG.
JSON de stdout é determinístico e idêntico entre idiomas — apenas
strings destinadas a humanos são afetadas.
tz: Option<Tz>Fuso horário para campos *_iso no JSON de saída (ex: America/Sao_Paulo).
Aceita qualquer nome IANA da IANA Time Zone Database. Sem a flag, usa
SQLITE_GRAPHRAG_DISPLAY_TZ; se ausente, usa UTC. Não afeta campos epoch inteiros.
command: CommandsImplementations§
Source§impl Cli
impl Cli
Sourcepub fn validate_flags(&self) -> Result<(), String>
pub fn validate_flags(&self) -> Result<(), String>
Valida flags de concorrência e retorna erro descritivo localizado se inválidas.
Requer que crate::i18n::init() já tenha sido chamado (ocorre antes desta função
no fluxo de main). Em inglês emite mensagens EN; em português emite PT.
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Cli
impl Parser for Cli
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnsafeUnpin for Cli
impl UnwindSafe for Cli
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
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>
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>
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