pub struct ModuleBody { /* private fields */ }
Expand description
Corresponds the grammar rule module_body
.
Implementations§
source§impl ModuleBody
impl ModuleBody
pub fn set_library_status(&mut self, module_name: &Identifier)
pub fn has_imports(&self) -> bool
pub fn imports_len(&self) -> usize
pub fn imports(&self) -> impl Iterator<Item = &ImportStatement>
pub fn imports_mut(&mut self) -> impl Iterator<Item = &mut ImportStatement>
pub fn add_to_imports<I>(&mut self, value: I)where
I: Into<ImportStatement>,
pub fn extend_imports<I>(&mut self, extension: I)where
I: IntoIterator<Item = ImportStatement>,
pub fn has_definitions(&self) -> bool
pub fn definitions_len(&self) -> usize
pub fn definitions(&self) -> impl Iterator<Item = &Definition>
pub fn definitions_mut(&mut self) -> impl Iterator<Item = &mut Definition>
pub fn add_to_definitions<I>(&mut self, value: I) -> Result<(), Error>where
I: Into<Definition>,
pub fn extend_definitions<I>(&mut self, extension: I) -> Result<(), Error>where
I: IntoIterator<Item = Definition>,
pub fn imported_modules(&self) -> HashSet<&Identifier>
pub fn imported_module_versions( &self, ) -> HashMap<&Identifier, Option<&HeaderValue<Url>>>
pub fn imported_types(&self) -> HashSet<&QualifiedIdentifier>
pub fn get_definition(&self, name: &Identifier) -> Option<&Definition>
pub fn datatype_definitions(&self) -> impl Iterator<Item = &DatatypeDef>
pub fn entity_definitions(&self) -> impl Iterator<Item = &EntityDef>
pub fn enum_definitions(&self) -> impl Iterator<Item = &EnumDef>
pub fn event_definitions(&self) -> impl Iterator<Item = &EventDef>
pub fn property_definitions(&self) -> impl Iterator<Item = &PropertyDef>
pub fn rdf_definitions(&self) -> impl Iterator<Item = &RdfDef>
pub fn structure_definitions(&self) -> impl Iterator<Item = &StructureDef>
pub fn type_class_definitions(&self) -> impl Iterator<Item = &TypeClassDef>
pub fn union_definitions(&self) -> impl Iterator<Item = &UnionDef>
pub fn defined_names(&self) -> HashSet<&Identifier>
Trait Implementations§
source§impl Clone for ModuleBody
impl Clone for ModuleBody
source§fn clone(&self) -> ModuleBody
fn clone(&self) -> ModuleBody
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ModuleBody
impl Debug for ModuleBody
source§impl Default for ModuleBody
impl Default for ModuleBody
source§fn default() -> ModuleBody
fn default() -> ModuleBody
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ModuleBody
impl<'de> Deserialize<'de> for ModuleBody
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 HasAnnotations for ModuleBody
impl HasAnnotations for ModuleBody
fn has_annotations(&self) -> bool
fn annotations_len(&self) -> usize
fn annotations(&self) -> impl Iterator<Item = &Annotation>
fn annotations_mut(&mut self) -> impl Iterator<Item = &mut Annotation>
fn add_to_annotations<I>(&mut self, value: I)where
I: Into<Annotation>,
fn extend_annotations<I>(&mut self, extension: I)where
I: IntoIterator<Item = Annotation>,
fn has_annotation_properties(&self) -> bool
fn annotation_properties(&self) -> impl Iterator<Item = &AnnotationProperty>
fn has_rdf_type(&self, type_id: &IdentifierReference) -> bool
fn rdf_types(&self) -> impl Iterator<Item = &IdentifierReference>
fn preferred_label(&self) -> impl Iterator<Item = &LanguageString>
fn alternate_labels(&self) -> impl Iterator<Item = &LanguageString>
fn descriptions(&self) -> impl Iterator<Item = &LanguageString>
fn definitions(&self) -> impl Iterator<Item = &LanguageString>
fn has_constraints(&self) -> bool
fn annotation_constraints(&self) -> impl Iterator<Item = &Constraint>
source§impl HasSourceSpan for ModuleBody
impl HasSourceSpan for ModuleBody
fn with_source_span(self, span: Span) -> Self
fn source_span(&self) -> Option<&Span>
fn set_source_span(&mut self, span: Span)
fn unset_source_span(&mut self)
fn has_source_span(&self) -> bool
source§impl MaybeIncomplete for ModuleBody
impl MaybeIncomplete for ModuleBody
fn is_incomplete(&self, top: &Module, cache: &impl ModuleStore) -> bool
source§impl References for ModuleBody
impl References for ModuleBody
fn referenced_types<'a>(&'a self, names: &mut HashSet<&'a IdentifierReference>)
fn referenced_annotations<'a>( &'a self, names: &mut HashSet<&'a IdentifierReference>, )
source§impl Serialize for ModuleBody
impl Serialize for ModuleBody
source§impl Validate for ModuleBody
impl Validate for ModuleBody
source§fn validate(
&self,
top: &Module,
cache: &impl ModuleStore,
loader: &impl ModuleLoader,
check_constraints: bool,
)
fn validate( &self, top: &Module, cache: &impl ModuleStore, loader: &impl ModuleLoader, check_constraints: bool, )
§Checks
- All import statements are valid
ImportStatement
s - All annotations are valid
Annotation
s - All definitions are valid
Definition
s
Auto Trait Implementations§
impl Freeze for ModuleBody
impl RefUnwindSafe for ModuleBody
impl Send for ModuleBody
impl Sync for ModuleBody
impl Unpin for ModuleBody
impl UnwindSafe for ModuleBody
Blanket Implementations§
source§impl<A> AnnotationBuilder for Awhere
A: HasAnnotations,
impl<A> AnnotationBuilder for Awhere
A: HasAnnotations,
fn with_predicate<I, V>(self, predicate: I, value: V) -> A
fn with_type<I>(self, name: I) -> Self
fn with_super_class<I>(self, name: I) -> Self
fn with_equivalent_class<I>(self, name: I) -> Self
fn with_super_property<I>(self, name: I) -> Self
fn with_domain<I>(self, name: I) -> Self
fn with_comment<S>(self, comment: S) -> Self
fn with_label<S>(self, label: S) -> Self
fn with_see_also_str(self, resource: &str) -> Selfwhere
Self: Sized,
fn with_see_also(self, resource: Url) -> Selfwhere
Self: Sized,
fn with_see_also_ref<I>(self, resource: I) -> Self
fn with_is_defined_by(self, resource: Url) -> Selfwhere
Self: Sized,
fn with_is_defined_by_str(self, resource: &str) -> Selfwhere
Self: Sized,
fn with_is_defined_by_ref<I>(self, resource: I) -> Self
fn with_range<I>(self, name: I) -> Self
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)