Struct apollo_compiler::validation::WithErrors
source · pub struct WithErrors<T> {
pub partial: T,
pub errors: DiagnosticList,
}
Expand description
A conversion failed with some errors, but also resulted in a partial document.
The Debug
trait is implemented by forwarding to Self::errors
and
ignoring Self::partial
.
This is so that the panic message prints (only) errors when .unwrap()
is called on a Result<_, WithError<_>>
value as returned by various APIs.
Fields§
§partial: T
The partial result of the conversion. Some components may be missing, for example if an error causes them not to be representable in the target data structure.
errors: DiagnosticList
Errors collected during the conversion.
Should be non-empty when WithError
is returned.
Trait Implementations§
source§impl<T> Debug for WithErrors<T>
impl<T> Debug for WithErrors<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for WithErrors<T>where
T: RefUnwindSafe,
impl<T> Send for WithErrors<T>where
T: Send,
impl<T> Sync for WithErrors<T>where
T: Sync,
impl<T> Unpin for WithErrors<T>where
T: Unpin,
impl<T> UnwindSafe for WithErrors<T>where
T: 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