#[non_exhaustive]pub struct Sourced<T> {
pub source_id: Option<SourceId>,
pub value: T,
}Expand description
A value together with the source that produced it.
Sources pushed without an explicit key have source_id: None. On an error,
the key still identifies the failing source even if its parser has been popped.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source_id: Option<SourceId>The caller-supplied source key, if any.
value: TThe event, parse result, or error associated with the source.
Trait Implementations§
Auto Trait Implementations§
impl<T> Forget for Sourced<T>
impl<T> Freeze for Sourced<T>where
T: Freeze,
impl<T> Move for Sourced<T>
impl<T> RefUnwindSafe for Sourced<T>where
T: RefUnwindSafe,
impl<T> Send for Sourced<T>where
T: Send,
impl<T> Sync for Sourced<T>where
T: Sync,
impl<T> Unpin for Sourced<T>where
T: Unpin,
impl<T> UnsafeUnpin for Sourced<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Sourced<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