pub struct DeclarationProjection { /* private fields */ }Expand description
The nominal declaration facet of one model.
Implementations§
Source§impl DeclarationProjection
impl DeclarationProjection
Sourcepub fn new(
parent: Option<TypeId>,
value_type: Option<ValueTypeTag>,
is_abstract: bool,
is_constructible: bool,
annotations: BTreeMap<AnnotationFactId, ProjectedAnnotation>,
direct_fields: Vec<OwnsFactId>,
direct_roles: BTreeMap<RoleId, DeclaredRoleProjection>,
direct_plays: BTreeSet<PlaysFactId>,
) -> Result<Self, Diagnostic>
pub fn new( parent: Option<TypeId>, value_type: Option<ValueTypeTag>, is_abstract: bool, is_constructible: bool, annotations: BTreeMap<AnnotationFactId, ProjectedAnnotation>, direct_fields: Vec<OwnsFactId>, direct_roles: BTreeMap<RoleId, DeclaredRoleProjection>, direct_plays: BTreeSet<PlaysFactId>, ) -> Result<Self, Diagnostic>
Construct one declaration facet from direct attachment identities.
Sourcepub fn with_direct_sub(
self,
direct_sub: Option<DirectSubProjection>,
) -> Result<Self, Diagnostic>
pub fn with_direct_sub( self, direct_sub: Option<DirectSubProjection>, ) -> Result<Self, Diagnostic>
Attach the direct subtype identity, origin, and annotations.
Sourcepub fn with_value_annotations(
self,
annotations: BTreeMap<AnnotationFactId, ProjectedAnnotation>,
) -> Result<Self, Diagnostic>
pub fn with_value_annotations( self, annotations: BTreeMap<AnnotationFactId, ProjectedAnnotation>, ) -> Result<Self, Diagnostic>
Attach effective attribute-value constraints without changing legacy construction.
Sourcepub const fn direct_sub(&self) -> Option<&DirectSubProjection>
pub const fn direct_sub(&self) -> Option<&DirectSubProjection>
Return the exact direct subtype declaration, if this model has a parent.
Sourcepub const fn value_type(&self) -> Option<ValueTypeTag>
pub const fn value_type(&self) -> Option<ValueTypeTag>
Return an attribute’s effective scalar domain.
Sourcepub const fn is_abstract(&self) -> bool
pub const fn is_abstract(&self) -> bool
Report abstractness.
Sourcepub const fn is_constructible(&self) -> bool
pub const fn is_constructible(&self) -> bool
Report constructibility.
Sourcepub const fn annotations(
&self,
) -> &BTreeMap<AnnotationFactId, ProjectedAnnotation>
pub const fn annotations( &self, ) -> &BTreeMap<AnnotationFactId, ProjectedAnnotation>
Return effective type annotations.
Sourcepub const fn value_annotations(
&self,
) -> &BTreeMap<AnnotationFactId, ProjectedAnnotation>
pub const fn value_annotations( &self, ) -> &BTreeMap<AnnotationFactId, ProjectedAnnotation>
Return effective attribute-value constraints.
Sourcepub fn direct_fields(&self) -> &[OwnsFactId]
pub fn direct_fields(&self) -> &[OwnsFactId]
Return direct ownership attachment identities in semantic order.
Sourcepub const fn direct_roles(&self) -> &BTreeMap<RoleId, DeclaredRoleProjection>
pub const fn direct_roles(&self) -> &BTreeMap<RoleId, DeclaredRoleProjection>
Return direct role declarations.
Sourcepub const fn direct_plays(&self) -> &BTreeSet<PlaysFactId>
pub const fn direct_plays(&self) -> &BTreeSet<PlaysFactId>
Return direct role-playing attachments.
Trait Implementations§
Source§impl Clone for DeclarationProjection
impl Clone for DeclarationProjection
Source§fn clone(&self) -> DeclarationProjection
fn clone(&self) -> DeclarationProjection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DeclarationProjection
impl Debug for DeclarationProjection
impl Eq for DeclarationProjection
Source§impl PartialEq for DeclarationProjection
impl PartialEq for DeclarationProjection
Source§impl Serialize for DeclarationProjection
impl Serialize for DeclarationProjection
impl StructuralPartialEq for DeclarationProjection
Auto Trait Implementations§
impl Freeze for DeclarationProjection
impl RefUnwindSafe for DeclarationProjection
impl Send for DeclarationProjection
impl Sync for DeclarationProjection
impl Unpin for DeclarationProjection
impl UnsafeUnpin for DeclarationProjection
impl UnwindSafe for DeclarationProjection
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