pub struct LexicalWarning {
pub code: String,
pub message: String,
pub data: Option<Value>,
}Expand description
LexicalWarning: a warning with a stable code, passed to the editor’s
onWarn (as the LexicalError LexicalError::from_warning makes,
whose warning it is) by packages that report
recoverable, warn-level conditions. The code is namespaced by the package that reports it
("@example/pkg/some-condition"); a match over codes needs a default
arm, since packages may add codes in any release.
Fields§
§code: StringWhat happened, namespaced by the package that reports it.
message: StringFor people; it may change.
data: Option<Value>Details for programs, documented with each code.
Implementations§
Trait Implementations§
Source§impl Clone for LexicalWarning
impl Clone for LexicalWarning
Source§impl Debug for LexicalWarning
impl Debug for LexicalWarning
Source§impl Display for LexicalWarning
impl Display for LexicalWarning
impl Eq for LexicalWarning
Source§impl Error for LexicalWarning
impl Error for LexicalWarning
1.30.0 · 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 PartialEq for LexicalWarning
impl PartialEq for LexicalWarning
impl StructuralPartialEq for LexicalWarning
Auto Trait Implementations§
impl Forget for LexicalWarning
impl Freeze for LexicalWarning
impl Move for LexicalWarning
impl RefUnwindSafe for LexicalWarning
impl Send for LexicalWarning
impl Sync for LexicalWarning
impl Unpin for LexicalWarning
impl UnsafeUnpin for LexicalWarning
impl UnwindSafe for LexicalWarning
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