pub struct BuildScriptOutputs {
outputs: HashMap<Metadata, BuildOutput>,
}
Expand description
Map of packages to build script output.
This initially starts out as empty. Overridden build scripts get
inserted during build_map
. The rest of the entries are added
immediately after each build script runs.
The Metadata
is the unique metadata hash for the RunCustomBuild Unit of
the package. It needs a unique key, since the build script can be run
multiple times with different profiles or features. We can’t embed a
Unit
because this structure needs to be shareable between threads.
Fields§
§outputs: HashMap<Metadata, BuildOutput>
Implementations§
Source§impl BuildScriptOutputs
impl BuildScriptOutputs
Sourcefn insert(
&mut self,
pkg_id: PackageId,
metadata: Metadata,
parsed_output: BuildOutput,
)
fn insert( &mut self, pkg_id: PackageId, metadata: Metadata, parsed_output: BuildOutput, )
Inserts a new entry into the map.
Sourcefn contains_key(&self, metadata: Metadata) -> bool
fn contains_key(&self, metadata: Metadata) -> bool
Returns true
if the given key already exists.
Sourcepub fn get(&self, meta: Metadata) -> Option<&BuildOutput>
pub fn get(&self, meta: Metadata) -> Option<&BuildOutput>
Gets the build output for the given key.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&Metadata, &BuildOutput)>
pub fn iter(&self) -> impl Iterator<Item = (&Metadata, &BuildOutput)>
Returns an iterator over all entries.
Trait Implementations§
Source§impl Default for BuildScriptOutputs
impl Default for BuildScriptOutputs
Source§fn default() -> BuildScriptOutputs
fn default() -> BuildScriptOutputs
Auto Trait Implementations§
impl Freeze for BuildScriptOutputs
impl RefUnwindSafe for BuildScriptOutputs
impl Send for BuildScriptOutputs
impl Sync for BuildScriptOutputs
impl Unpin for BuildScriptOutputs
impl UnwindSafe for BuildScriptOutputs
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes