pub struct UnresolvedPackageGroup {
pub main: UnresolvedPackage,
pub nested: Vec<UnresolvedPackage>,
pub source_map: SourceMap,
}Expand description
Tracks a set of packages, all pulled from the same group of WIT source files.
Fields§
§main: UnresolvedPackageThe “main” package in this package group which was found at the root of the WIT files.
Note that this is required to be present in all WIT files.
nested: Vec<UnresolvedPackage>Nested packages found while parsing main, if any.
source_map: SourceMapA set of processed source files from which these packages have been parsed.
Implementations§
Source§impl UnresolvedPackageGroup
impl UnresolvedPackageGroup
Sourcepub fn parse(
path: impl AsRef<Path>,
contents: &str,
) -> Result<UnresolvedPackageGroup>
pub fn parse( path: impl AsRef<Path>, contents: &str, ) -> Result<UnresolvedPackageGroup>
Parses the given string as a wit document.
The path argument is used for error reporting. The contents provided
are considered to be the contents of path. This function does not read
the filesystem.
Sourcepub fn parse_dir(path: impl AsRef<Path>) -> Result<UnresolvedPackageGroup>
pub fn parse_dir(path: impl AsRef<Path>) -> Result<UnresolvedPackageGroup>
Parses a WIT package from the directory provided.
This method will look at all files under the path specified. All
*.wit files are parsed and assumed to be part of the same package
grouping. This is useful when a WIT package is split across multiple
files.
Trait Implementations§
Source§impl Clone for UnresolvedPackageGroup
impl Clone for UnresolvedPackageGroup
Source§fn clone(&self) -> UnresolvedPackageGroup
fn clone(&self) -> UnresolvedPackageGroup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl PartialEq for UnresolvedPackageGroup
impl PartialEq for UnresolvedPackageGroup
impl Eq for UnresolvedPackageGroup
impl StructuralPartialEq for UnresolvedPackageGroup
Auto Trait Implementations§
impl Freeze for UnresolvedPackageGroup
impl RefUnwindSafe for UnresolvedPackageGroup
impl Send for UnresolvedPackageGroup
impl Sync for UnresolvedPackageGroup
impl Unpin for UnresolvedPackageGroup
impl UnsafeUnpin for UnresolvedPackageGroup
impl UnwindSafe for UnresolvedPackageGroup
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.