pub struct DecodedComponent { /* private fields */ }Implementations§
Source§impl DecodedComponent
impl DecodedComponent
pub async fn from_publishing_source( data: PublishingSource, ) -> Result<(PublishingSource, DecodedComponent), Error>
Sourcepub async fn from_publishing_source_with_package(
data: PublishingSource,
package_override: Option<(PackageRef, Version)>,
) -> Result<(PublishingSource, DecodedComponent), Error>
pub async fn from_publishing_source_with_package( data: PublishingSource, package_override: Option<(PackageRef, Version)>, ) -> Result<(PublishingSource, DecodedComponent), Error>
Like Self::from_publishing_source but overrides the derived
(package, version) identity with package_override when supplied.
Sourcepub async fn from_content_stream(
stream: ContentStream,
package_ref: PackageRef,
version: Version,
) -> Result<DecodedComponent, Error>
pub async fn from_content_stream( stream: ContentStream, package_ref: PackageRef, version: Version, ) -> Result<DecodedComponent, Error>
Construct from a registry content stream. Callers already know the
(package, version) identity from the registry listing they followed
to get here, so we take it as input rather than re-deriving it from
the wasm metadata.
pub fn version(&self) -> &Version
pub fn package(&self) -> &PackageRef
Sourcepub fn semver_check(&self, other: &DecodedComponent) -> Result<(), Error>
pub fn semver_check(&self, other: &DecodedComponent) -> Result<(), Error>
Check that self and other are semver-compatible neighbors in the
same cargo-^ compatibility range.
Trait Implementations§
impl Eq for DecodedComponent
Source§impl Ord for DecodedComponent
impl Ord for DecodedComponent
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DecodedComponent
impl PartialEq for DecodedComponent
Source§impl PartialOrd for DecodedComponent
impl PartialOrd for DecodedComponent
Auto Trait Implementations§
impl Freeze for DecodedComponent
impl RefUnwindSafe for DecodedComponent
impl Send for DecodedComponent
impl Sync for DecodedComponent
impl Unpin for DecodedComponent
impl UnsafeUnpin for DecodedComponent
impl UnwindSafe for DecodedComponent
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
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.