pub struct ExtractResult<T> {
pub value: T,
pub warnings: Vec<ExtractWarning>,
}Expand description
Result wrapper that pairs a value with collected warnings.
Used when extraction can partially succeed with non-fatal issues.
Fields§
§value: TThe extracted value.
warnings: Vec<ExtractWarning>Warnings collected during extraction.
Implementations§
Source§impl<T> ExtractResult<T>
impl<T> ExtractResult<T>
Sourcepub fn with_warnings(value: T, warnings: Vec<ExtractWarning>) -> Self
pub fn with_warnings(value: T, warnings: Vec<ExtractWarning>) -> Self
Create a result with warnings.
Sourcepub fn map<U>(self, f: impl FnOnce(T) -> U) -> ExtractResult<U>
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> ExtractResult<U>
Transform the value while preserving warnings.
Trait Implementations§
Source§impl<T: Clone> Clone for ExtractResult<T>
impl<T: Clone> Clone for ExtractResult<T>
Source§fn clone(&self) -> ExtractResult<T>
fn clone(&self) -> ExtractResult<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for ExtractResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for ExtractResult<T>where
T: RefUnwindSafe,
impl<T> Send for ExtractResult<T>where
T: Send,
impl<T> Sync for ExtractResult<T>where
T: Sync,
impl<T> Unpin for ExtractResult<T>where
T: Unpin,
impl<T> UnsafeUnpin for ExtractResult<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ExtractResult<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