pub struct LockfileModule {
pub name: String,
pub package_version: String,
pub package_name: String,
pub package_path: String,
pub resolved: String,
pub resolved_source: String,
pub abi: Abi,
pub source: String,
pub prehashed_module_key: Option<String>,
}Expand description
The latest Lockfile module struct (V4) It contains data relating to the Wasm module itself
Fields§
§name: String§package_version: String§package_name: String§package_path: String§resolved: String§resolved_source: String§abi: Abi§source: StringThe source path is where the wasm module lives
prehashed_module_key: Option<String>The hash of the wasm module cached here for faster startup time
Implementations§
Source§impl LockfileModule
impl LockfileModule
pub fn from_module( manifest_base_dir_path: &Path, name: &str, version: &Version, module: &Module, download_url: &str, ) -> Self
pub fn from_local_module( manifest_base_dir_path: &Path, name: &str, version: &Version, module: &Module, ) -> Self
Sourcepub fn get_canonical_source_path_from_lockfile_dir(
&self,
lockfile_dir: PathBuf,
) -> PathBuf
pub fn get_canonical_source_path_from_lockfile_dir( &self, lockfile_dir: PathBuf, ) -> PathBuf
Returns the full, absolute path to the WASM module
Sourcepub fn get_canonical_manifest_path_from_lockfile_dir(
&self,
lockfile_dir: PathBuf,
local_dep: bool,
) -> PathBuf
pub fn get_canonical_manifest_path_from_lockfile_dir( &self, lockfile_dir: PathBuf, local_dep: bool, ) -> PathBuf
Returns the Manifest path from the lockfile
This method does extra logic to detect if the lockfile is global and adjusts accordingly.
The local_dep flag should be passed when its known that the manifest we want to access
is not in the current directory and that we need to add wapm_packages/... to it.
Trait Implementations§
Source§impl Clone for LockfileModule
impl Clone for LockfileModule
Source§impl Debug for LockfileModule
impl Debug for LockfileModule
Source§impl Default for LockfileModule
impl Default for LockfileModule
Source§impl<'de> Deserialize<'de> for LockfileModule
impl<'de> Deserialize<'de> for LockfileModule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LockfileModule
Source§impl PartialEq for LockfileModule
impl PartialEq for LockfileModule
Source§impl Serialize for LockfileModule
impl Serialize for LockfileModule
impl StructuralPartialEq for LockfileModule
Auto Trait Implementations§
impl Freeze for LockfileModule
impl RefUnwindSafe for LockfileModule
impl Send for LockfileModule
impl Sync for LockfileModule
impl Unpin for LockfileModule
impl UnsafeUnpin for LockfileModule
impl UnwindSafe for LockfileModule
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more