Skip to main content

Mensagem

Enum Mensagem 

Source
pub enum Mensagem {
Show 54 variants ChaveAdicionada, ChaveJaExistia, NenhumaChaveArmazenada, UsarKeysAdd, ContadorChaves, NenhumaChaveParaRemover, IndiceInvalido, ChaveRemovidaSucesso, OperacaoCancelada, TodasChavesRemovidas, SistemaXdgNaoSuportado, ChavesImportadasSucesso, NenhumaChaveContext7NoArquivo, ConfirmarRemoverTodas, RespostaConfirmacao, ChaveVaziaOuInvalida, AvisoFormatoChave, NenhumaBibliotecaEncontrada, BibliotecasEncontradas, ConfiancaScore, NenhumaDocumentacaoEncontrada, TituloDocumentacao, TituloFontes, SemConteudoDisponivel, BuscandoBiblioteca, ErroDeRede, ErroDeRedeDocs, FalhaDesserializar, RateLimitAtingido, ErrodoServidor, ChaveApiInvalida, Tentativa, AguardandoRetry, ErroCaminhoXdg, FalhaLerConfig, FalhaTomlInvalido, FalhaEscreverConfig, FalhaCriarDiretorio, NenhumaChaveConfigurada, FalhaSerializarToml, ChavesCarregadasEnvVar, ChavesCarregadasXdg, FalhaLerXdgContinuando, IniciandoComChaves, ChavesCarregadasCompileTime, FalhaSerializarJson, FalhaSerializarDocs, FalhaBuscarBiblioteca, FalhaLerMetadados, FalhaDefinirPermissoes, FalhaBuscarDocumentacao, FalhaCriarClienteHttp, SemDocumentacaoDisponivel, BibliotecaNaoEncontradaApi,
}
Expand description

All user-facing messages indexed by variant.

Each variant maps to a pair of (English, Portuguese) strings.

Variants§

§

ChaveAdicionada

“Key added successfully at: {path}”

§

ChaveJaExistia

“Key already exists (skipping).”

§

NenhumaChaveArmazenada

“No key stored.”

§

UsarKeysAdd

“Use context7 keys add <KEY> to add a key.”

§

ContadorChaves

“{n} key(s) stored:”

§

NenhumaChaveParaRemover

“No key stored to remove.”

§

IndiceInvalido

“Index {i} invalid. Use a number between 1 and {n}.”

§

ChaveRemovidaSucesso

“Key {masked} removed successfully.”

§

OperacaoCancelada

“Operation cancelled.”

§

TodasChavesRemovidas

“All keys removed.”

§

SistemaXdgNaoSuportado

“System does not support XDG directories.”

§

ChavesImportadasSucesso

“{imported}/{total} key(s) imported successfully.”

§

NenhumaChaveContext7NoArquivo

“No CONTEXT7_API= key found in: {file}”

§

ConfirmarRemoverTodas

“Are you sure you want to remove ALL keys? [y/N] “ / “[s/N] “

§

RespostaConfirmacao

Accepted confirmation responses: “y”/“yes” or “s”/“sim”

§

ChaveVaziaOuInvalida

“API key cannot be empty. Get a key at https://context7.com

§

AvisoFormatoChave

“Warning: key does not match expected format (ctx7sk-…). API calls may fail.”

§

NenhumaBibliotecaEncontrada

“No library found.”

§

BibliotecasEncontradas

“Libraries found:”

§

ConfiancaScore

“Trust:”

§

NenhumaDocumentacaoEncontrada

“No documentation found.”

§

TituloDocumentacao

“Documentation:”

§

TituloFontes

“Sources:”

§

SemConteudoDisponivel

“No content available.”

§

BuscandoBiblioteca

“Searching library: {name}”

§

ErroDeRede

“Network error searching library: {err}”

§

ErroDeRedeDocs

“Network error fetching documentation: {err}”

§

FalhaDesserializar

“Failed to deserialise JSON response: {err}”

§

RateLimitAtingido

“Rate limit reached (429), waiting for retry…”

§

ErrodoServidor

“Server error ({status}), retrying…”

§

ChaveApiInvalida

“Invalid API key (401/403), trying next…”

§

Tentativa

“Attempt {n}/{max}”

§

AguardandoRetry

“Waiting {ms}ms before retrying…”

§

ErroCaminhoXdg

“System does not support XDG — cannot save configuration”

§

FalhaLerConfig

“Failed to read XDG config at: {path}”

§

FalhaTomlInvalido

“Invalid TOML at: {path}”

§

FalhaEscreverConfig

“Failed to write config at: {path}”

§

FalhaCriarDiretorio

“Failed to create directory: {path}”

§

NenhumaChaveConfigurada

“No API key configured. Set CONTEXT7_API_KEYS or use keys add.”

§

FalhaSerializarToml

“Failed to serialise configuration to TOML”

§

ChavesCarregadasEnvVar

“Keys loaded from CONTEXT7_API_KEYS environment variable”

§

ChavesCarregadasXdg

“Keys loaded from XDG configuration”

§

FalhaLerXdgContinuando

“Failed to read XDG configuration (continuing): {err}”

§

IniciandoComChaves

“Starting context7 with {n} API keys available”

§

ChavesCarregadasCompileTime

“Keys loaded from compile-time CONTEXT7_API_KEYS”

§

FalhaSerializarJson

“Failed to serialise results to JSON”

§

FalhaSerializarDocs

“Failed to serialise documentation to JSON”

§

FalhaBuscarBiblioteca

“Failed to search library ‘{name}’”

§

FalhaLerMetadados

“Failed to read metadata of: {path}”

§

FalhaDefinirPermissoes

“Failed to set permissions on: {path}”

§

FalhaBuscarDocumentacao

“Failed to fetch documentation for: {library_id}”

§

FalhaCriarClienteHttp

“Failed to create HTTP client”

§

SemDocumentacaoDisponivel

“No documentation available”

§

BibliotecaNaoEncontradaApi

“Library not found. Verify the ID via context7 library <name>.”

Implementations§

Source§

impl Mensagem

Source

pub fn texto(self, idioma: Idioma) -> &'static str

Returns the localised text for this message in the given language.

Prefer this over the global t function when you need deterministic translations without depending on the process-wide language setting (useful for tests and library usage).

Trait Implementations§

Source§

impl Clone for Mensagem

Source§

fn clone(&self) -> Mensagem

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Mensagem

Source§

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

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

impl Copy for Mensagem

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more