pub struct TextError {
pub spans: Vec<Span>,
pub reason: String,
}Expand description
The error for a GVariant text form that from_text refuses.
It holds the spans of the input that the refusal names, and the reason.
fmt::Display writes the pair as <spans>:<reason>, the form that the
ostree command reports. A comma separates two spans.
Fields§
§spans: Vec<Span>The ranges of the input that the refusal names.
The ranges are in the order of the message. Most refusals hold one span. If the reason names a pair that disagrees, the field holds two spans, for example the two elements that 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 Forget for TextError
impl Freeze for TextError
impl Move for TextError
impl RefUnwindSafe for TextError
impl Send for TextErrorwhere
RawVecInner: Send,
impl Sync for TextErrorwhere
RawVecInner: Sync,
impl Unpin for TextError
impl UnsafeUnpin for TextErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Span>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for TextErrorwhere
RawVecInner: UnwindSafe,
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