#[non_exhaustive]pub struct InverseAttribute {
pub name: String,
pub redeclares: Option<String>,
pub entity: String,
pub for_attribute: String,
pub aggregation: Option<Aggregation>,
}Expand description
One INVERSE attribute: Name : SET [0:1] OF Entity FOR Attribute;.
Inverse attributes occupy no Part 21 slot; they state how many instances
of entity may point at this one through for_attribute.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringDeclared name, unqualified.
redeclares: Option<String>The supertype named when a subtype redeclares an inherited inverse
(SELF\X.Name : ...); None for a new inverse attribute.
entity: StringThe entity whose attribute points back at this one.
for_attribute: StringThe attribute named after FOR, as written.
aggregation: Option<Aggregation>SET or BAG with its bounds; None for a single-valued inverse.
Implementations§
Source§impl InverseAttribute
impl InverseAttribute
Sourcepub fn new(
name: impl Into<String>,
entity: impl Into<String>,
for_attribute: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, entity: impl Into<String>, for_attribute: impl Into<String>, ) -> Self
Creates a single-valued inverse attribute.
Sourcepub fn redeclaring(self, supertype: impl Into<String>) -> Self
pub fn redeclaring(self, supertype: impl Into<String>) -> Self
Marks the inverse a redeclaration of supertype’s.
Sourcepub fn with_aggregation(self, aggregation: Aggregation) -> Self
pub fn with_aggregation(self, aggregation: Aggregation) -> Self
Makes the inverse an aggregate (SET or BAG).
Trait Implementations§
Source§impl Clone for InverseAttribute
impl Clone for InverseAttribute
Source§impl Debug for InverseAttribute
impl Debug for InverseAttribute
impl Eq for InverseAttribute
Source§impl PartialEq for InverseAttribute
impl PartialEq for InverseAttribute
impl StructuralPartialEq for InverseAttribute
Auto Trait Implementations§
impl Freeze for InverseAttribute
impl RefUnwindSafe for InverseAttribute
impl Send for InverseAttribute
impl Sync for InverseAttribute
impl Unpin for InverseAttribute
impl UnsafeUnpin for InverseAttribute
impl UnwindSafe for InverseAttribute
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