pub struct TransformOutput<T> {
pub value: T,
pub diagnostics: Vec<TransformDiagnostic>,
}Expand description
A transformed value together with all non-fatal semantic diagnostics produced while creating it.
Fields§
§value: TConverted value.
diagnostics: Vec<TransformDiagnostic>Non-fatal semantic diagnostics produced by this conversion call.
Implementations§
Source§impl<T> TransformOutput<T>
impl<T> TransformOutput<T>
Sourcepub fn new(value: T, diagnostics: Vec<TransformDiagnostic>) -> Self
pub fn new(value: T, diagnostics: Vec<TransformDiagnostic>) -> Self
Pair a converted value with its diagnostics.
Sourcepub fn into_value(self) -> T
pub fn into_value(self) -> T
Discard diagnostics and return only the converted value.
Sourcepub fn into_parts(self) -> (T, Vec<TransformDiagnostic>)
pub fn into_parts(self) -> (T, Vec<TransformDiagnostic>)
Split the converted value from its diagnostics.
Trait Implementations§
Source§impl<T: Clone> Clone for TransformOutput<T>
impl<T: Clone> Clone for TransformOutput<T>
Source§fn clone(&self) -> TransformOutput<T>
fn clone(&self) -> TransformOutput<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for TransformOutput<T>
impl<T: Debug> Debug for TransformOutput<T>
impl<T: Eq> Eq for TransformOutput<T>
Source§impl<T: PartialEq> PartialEq for TransformOutput<T>
impl<T: PartialEq> PartialEq for TransformOutput<T>
impl<T: PartialEq> StructuralPartialEq for TransformOutput<T>
Auto Trait Implementations§
impl<T> Freeze for TransformOutput<T>where
T: Freeze,
impl<T> RefUnwindSafe for TransformOutput<T>where
T: RefUnwindSafe,
impl<T> Send for TransformOutput<T>where
T: Send,
impl<T> Sync for TransformOutput<T>where
T: Sync,
impl<T> Unpin for TransformOutput<T>where
T: Unpin,
impl<T> UnsafeUnpin for TransformOutput<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TransformOutput<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