pub struct TextError {
pub spans: Vec<Span>,
pub reason: String,
}Expand description
Why a GVariant text form was refused: the spans of the input it names, and
the reason. fmt::Display renders the pair the way the tool reports it,
<spans>:<reason>, with the spans separated by commas.
Fields§
§spans: Vec<Span>The ranges of the input the refusal names, in the order the message reports them. It holds one span for most refusals, and two where the reason names a pair that disagrees, such as the two elements a container cannot unify.
reason: StringThe refusal text, without the spans and without the separating colon.
Trait Implementations§
impl Eq for TextError
Source§impl Error for TextError
impl Error for TextError
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()
impl StructuralPartialEq for TextError
Auto Trait Implementations§
impl Freeze for TextError
impl RefUnwindSafe for TextError
impl Send for TextError
impl Sync for TextError
impl Unpin for TextError
impl UnsafeUnpin for TextError
impl UnwindSafe for TextError
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