pub struct ExternalPackages { /* private fields */ }Expand description
Packages to reference rather than generate, keyed by package id or package name.
The name form is the one to prefer: a package id is the hash of one build, so pinning by id stops matching the moment the dependency is rebuilt, while the name survives a version bump — which is the whole point of addressing packages by name under Smart Contract Upgrade.
Implementations§
Source§impl ExternalPackages
impl ExternalPackages
Sourcepub fn with(self, key: impl Into<String>, crate_name: impl Into<String>) -> Self
pub fn with(self, key: impl Into<String>, crate_name: impl Into<String>) -> Self
Reference the package identified by key (its name, or its id hash) at
the crate crate_name, instead of generating it.
Sourcepub fn crate_names(&self) -> Vec<String>
pub fn crate_names(&self) -> Vec<String>
The crate names named here, sorted — what a generated manifest must depend on.
Trait Implementations§
Source§impl Clone for ExternalPackages
impl Clone for ExternalPackages
Source§fn clone(&self) -> ExternalPackages
fn clone(&self) -> ExternalPackages
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 Debug for ExternalPackages
impl Debug for ExternalPackages
Source§impl Default for ExternalPackages
impl Default for ExternalPackages
Source§fn default() -> ExternalPackages
fn default() -> ExternalPackages
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExternalPackages
impl RefUnwindSafe for ExternalPackages
impl Send for ExternalPackages
impl Sync for ExternalPackages
impl Unpin for ExternalPackages
impl UnsafeUnpin for ExternalPackages
impl UnwindSafe for ExternalPackages
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