pub enum GettextError {
InvalidFormat(String),
TranslationNotFound {
key: String,
context: Option<String>,
},
PathRequired,
InvalidPath(String),
InvalidInput(String),
FileLocked {
path: PathBuf,
},
Io(Error),
}Expand description
Unified error type returned by the parser, serializer, file I/O, store, and MCP tool layers.
Variants§
InvalidFormat(String)
PO format error surfaced by the parser.
TranslationNotFound
Lookup failed: no entry with the given key exists.
PathRequired
A tool was called without path in dynamic mode, or without a
configured default file in single-file mode.
InvalidPath(String)
Path validation rejected the caller-supplied path (traversal, outside base directory, etc.).
InvalidInput(String)
Generic invalid-argument error from the store or a tool handler.
FileLocked
Another process (likely Poedit or a translator’s editor) holds an exclusive lock on the file we tried to write.
Io(Error)
Underlying std::io::Error from a filesystem call.
Trait Implementations§
Source§impl Debug for GettextError
impl Debug for GettextError
Source§impl Display for GettextError
impl Display for GettextError
Source§impl Error for GettextError
impl Error for GettextError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for GettextError
impl From<Error> for GettextError
Source§impl From<GettextError> for ErrorData
impl From<GettextError> for ErrorData
Source§fn from(e: GettextError) -> Self
fn from(e: GettextError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GettextError
impl !RefUnwindSafe for GettextError
impl Send for GettextError
impl Sync for GettextError
impl Unpin for GettextError
impl UnsafeUnpin for GettextError
impl !UnwindSafe for GettextError
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