pub struct TextFunctionError {
pub language: UnicodeLanguageIdentifier,
pub message_id: String,
pub kind: TextFunctionErrorKind,
}Expand description
Error that is returned when retrieving a translated text fails
Fields§
§language: UnicodeLanguageIdentifierThe language that was translated to while the error happened
message_id: StringThe message id the error happened for
kind: TextFunctionErrorKindThe kind of problem that occurred
Implementations§
Source§impl TextFunctionError
impl TextFunctionError
Sourcepub fn new(
language: &UnicodeLanguageIdentifier,
message_id: &str,
kind: TextFunctionErrorKind,
) -> Self
pub fn new( language: &UnicodeLanguageIdentifier, message_id: &str, kind: TextFunctionErrorKind, ) -> Self
Convenience contructor to create a new TextFunctionError form borrowed values
Trait Implementations§
Source§impl Debug for TextFunctionError
impl Debug for TextFunctionError
Source§impl Display for TextFunctionError
impl Display for TextFunctionError
Source§impl Error for TextFunctionError
impl Error for TextFunctionError
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()
Auto Trait Implementations§
impl Freeze for TextFunctionError
impl RefUnwindSafe for TextFunctionError
impl Send for TextFunctionError
impl Sync for TextFunctionError
impl Unpin for TextFunctionError
impl UnsafeUnpin for TextFunctionError
impl UnwindSafe for TextFunctionError
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