pub struct PackageDefinition {
pub modules: IndexMap<String, AccessControlled<ModuleDefinition>>,
}Expand description
Package definition
Fields§
§modules: IndexMap<String, AccessControlled<ModuleDefinition>>Implementations§
Source§impl PackageDefinition
impl PackageDefinition
Sourcepub fn to_specification(&self) -> PackageSpecification
pub fn to_specification(&self) -> PackageSpecification
The public face of this package: the specification a reader of it sees.
Only public modules, types and values appear, and each loses what a specification does not carry: a custom type whose constructors are private becomes opaque, as does an incomplete type definition, since neither has a public shape to publish. A definition carries no annotations, so the specification derived from one has none.
This is infallible, so a public value definition with no output type is skipped rather than refused: a specification states a value’s type, and one still being inferred has nothing to state yet.
Trait Implementations§
Source§impl Clone for PackageDefinition
impl Clone for PackageDefinition
Source§impl Debug for PackageDefinition
impl Debug for PackageDefinition
Source§impl<'de> Deserialize<'de> for PackageDefinition
impl<'de> Deserialize<'de> for PackageDefinition
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
Source§impl LinkedMetadataCarrier for PackageDefinition
impl LinkedMetadataCarrier for PackageDefinition
fn contains_linked_metadata(&self) -> bool
Source§impl PartialEq for PackageDefinition
impl PartialEq for PackageDefinition
Source§impl Serialize for PackageDefinition
impl Serialize for PackageDefinition
impl StructuralPartialEq for PackageDefinition
Auto Trait Implementations§
impl Freeze for PackageDefinition
impl RefUnwindSafe for PackageDefinition
impl Send for PackageDefinition
impl Sync for PackageDefinition
impl Unpin for PackageDefinition
impl UnsafeUnpin for PackageDefinition
impl UnwindSafe for PackageDefinition
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