pub struct SourceMetadataIndex(/* private fields */);Expand description
The metadata of every source of a run.
Only the engine constructs this, from the evidence session, and registers
it for the duration of one run, replacing any host-registered copy, as it
does crate::SourceDisciplines. A source’s schema comes from its
snapshot unless the session states it. A source without an entry has no
field read.
Implementations§
Source§impl SourceMetadataIndex
impl SourceMetadataIndex
Sourcepub fn new(
metadata: impl IntoIterator<Item = (SourceId, SourceMetadata)>,
) -> Self
pub fn new( metadata: impl IntoIterator<Item = (SourceId, SourceMetadata)>, ) -> Self
Indexes metadata by source.
Capability tests construct it; a run always uses the runtime’s own.
Sourcepub fn of(&self, source: &SourceId) -> Option<&SourceMetadata>
pub fn of(&self, source: &SourceId) -> Option<&SourceMetadata>
Everything known about source, if anything.
Trait Implementations§
Source§impl Clone for SourceMetadataIndex
impl Clone for SourceMetadataIndex
Source§impl Debug for SourceMetadataIndex
impl Debug for SourceMetadataIndex
Auto Trait Implementations§
impl Freeze for SourceMetadataIndex
impl RefUnwindSafe for SourceMetadataIndex
impl Send for SourceMetadataIndex
impl Sync for SourceMetadataIndex
impl Unpin for SourceMetadataIndex
impl UnsafeUnpin for SourceMetadataIndex
impl UnwindSafe for SourceMetadataIndex
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