pub struct EventObjectLink { /* private fields */ }Expand description
An event-to-object (E2O) link: which objects an event touched, and how.
The optional qualifier names the role of the object in the event (e.g.
"item", "customer"). A dangling link — one pointing at an undeclared
event or object — is a structural defect, refused as
OcelRefusal::DanglingEventObjectLink.
Structure-only: it is a typed edge in the OCEL graph, not a mined relation.
Implementations§
Source§impl EventObjectLink
impl EventObjectLink
Sourcepub fn new(event_id: impl Into<String>, object_id: impl Into<String>) -> Self
pub fn new(event_id: impl Into<String>, object_id: impl Into<String>) -> Self
Construct an unqualified E2O link.
use wasm4pm_compat::ocel::EventObjectLink;
let l = EventObjectLink::new("e1", "ord-1");
assert_eq!(l.event_id(), "e1");
assert_eq!(l.object_id(), "ord-1");Sourcepub fn qualified(self, qualifier: impl Into<String>) -> Self
pub fn qualified(self, qualifier: impl Into<String>) -> Self
Attach a role qualifier. Builder-style.
use wasm4pm_compat::ocel::EventObjectLink;
let l = EventObjectLink::new("e1", "ord-1").qualified("places");
assert_eq!(l.qualifier(), Some("places"));Sourcepub fn event_id(&self) -> &str
pub fn event_id(&self) -> &str
The referenced event id.
use wasm4pm_compat::ocel::EventObjectLink;
assert_eq!(EventObjectLink::new("e", "o").event_id(), "e");Trait Implementations§
Source§impl Clone for EventObjectLink
impl Clone for EventObjectLink
Source§fn clone(&self) -> EventObjectLink
fn clone(&self) -> EventObjectLink
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 EventObjectLink
impl Debug for EventObjectLink
impl Eq for EventObjectLink
Source§impl PartialEq for EventObjectLink
impl PartialEq for EventObjectLink
Source§fn eq(&self, other: &EventObjectLink) -> bool
fn eq(&self, other: &EventObjectLink) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EventObjectLink
Auto Trait Implementations§
impl Freeze for EventObjectLink
impl RefUnwindSafe for EventObjectLink
impl Send for EventObjectLink
impl Sync for EventObjectLink
impl Unpin for EventObjectLink
impl UnsafeUnpin for EventObjectLink
impl UnwindSafe for EventObjectLink
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