pub struct UnknownValue {
pub file: String,
pub line: u32,
pub subject: String,
pub predicate: String,
pub value: String,
pub declared: String,
pub suggestion: String,
}Expand description
Details of a closed-world violation (see CompileError::UnknownValue). Kept
in its own (boxed) struct so the common error path stays small.
Fields§
§file: StringThe source the offending reference is in.
line: u321-based line of the offending reference.
subject: StringThe variable’s subject.
predicate: StringThe variable’s predicate.
value: StringThe out-of-set value that was used.
declared: StringThe declared legal values, comma-joined (sorted).
suggestion: String — did you mean \x`?`, or empty when nothing is close enough.
Trait Implementations§
Source§impl Debug for UnknownValue
impl Debug for UnknownValue
Source§impl Display for UnknownValue
impl Display for UnknownValue
impl Eq for UnknownValue
Source§impl Error for UnknownValue
impl Error for UnknownValue
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 UnknownValue
impl PartialEq for UnknownValue
Source§fn eq(&self, other: &UnknownValue) -> bool
fn eq(&self, other: &UnknownValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UnknownValue
Auto Trait Implementations§
impl Freeze for UnknownValue
impl RefUnwindSafe for UnknownValue
impl Send for UnknownValue
impl Sync for UnknownValue
impl Unpin for UnknownValue
impl UnsafeUnpin for UnknownValue
impl UnwindSafe for UnknownValue
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