pub struct Package { /* private fields */ }Expand description
One package: its manifest and the definitions it carries.
Implementations§
Source§impl Package
impl Package
Sourcepub fn read(path: &Path) -> Result<Self, PackageError>
pub fn read(path: &Path) -> Result<Self, PackageError>
Reads the package at path: a .tgz file or a directory holding
package/package.json.
With a .index.json, the resources are indexed from it and a file of
a directory is read on first use; without one, every JSON file is
read for its resourceType, url and version.
§Errors
Returns PackageError when the path is no package, a file cannot be
read, a manifest, index or resource does not parse, or the index names
a file the package does not hold.
Sourcepub const fn dependencies(&self) -> &BTreeMap<String, String>
pub const fn dependencies(&self) -> &BTreeMap<String, String>
Returns the dependencies its manifest names, package name to version.
Sourcepub fn structure_definitions(&self) -> usize
pub fn structure_definitions(&self) -> usize
Returns the number of StructureDefinition resources the package
carries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnsafeUnpin for Package
impl UnwindSafe for Package
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,
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> ⓘ
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.