pub struct ManagedException<P, R> { /* private fields */ }Expand description
A guest exception payload with caller-defined relation roles.
The payload is the open role carried by the shared ManagedNode. Relation
roles are deliberately caller data: this adapter does not prescribe cause,
context, group, or suppression semantics.
Implementations§
Source§impl<P, R> ManagedException<P, R>
impl<P, R> ManagedException<P, R>
Sourcepub const fn new(payload: P) -> Self
pub const fn new(payload: P) -> Self
Creates an exception payload with the managed node’s standard edge limits.
Sourcepub const fn with_edge_limits(payload: P, limits: EdgeLimits) -> Self
pub const fn with_edge_limits(payload: P, limits: EdgeLimits) -> Self
Creates an exception payload with explicit managed edge limits.
Sourcepub fn replace_payload(&mut self, payload: P) -> P
pub fn replace_payload(&mut self, payload: P) -> P
Replaces the guest payload without changing relation identity.
Sourcepub fn insert_relation(
&mut self,
role: R,
target: ManagedId,
) -> Result<EdgeId, StrongEdgeMutationError>
pub fn insert_relation( &mut self, role: R, target: ManagedId, ) -> Result<EdgeId, StrongEdgeMutationError>
Adds a retaining relation with caller-owned role evidence.
Sourcepub fn remove_relation(
&mut self,
edge: EdgeId,
expected: ManagedId,
) -> Result<(R, ManagedId), StrongEdgeMutationError>
pub fn remove_relation( &mut self, edge: EdgeId, expected: ManagedId, ) -> Result<(R, ManagedId), StrongEdgeMutationError>
Removes exactly the expected relation and returns its role and target.
Trait Implementations§
Source§impl<P: Clone, R: Clone> Clone for ManagedException<P, R>
impl<P: Clone, R: Clone> Clone for ManagedException<P, R>
Source§fn clone(&self) -> ManagedException<P, R>
fn clone(&self) -> ManagedException<P, R>
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 moreimpl<P: Eq, R: Eq> Eq for ManagedException<P, R>
Source§impl<P, R> ManagedObject for ManagedException<P, R>
impl<P, R> ManagedObject for ManagedException<P, R>
Source§fn trace_edges(&self, visitor: &mut dyn EdgeVisitor)
fn trace_edges(&self, visitor: &mut dyn EdgeVisitor)
Enumerates all strong, weak, and ephemeron edges exactly once.
impl<P: PartialEq, R: PartialEq> StructuralPartialEq for ManagedException<P, R>
Auto Trait Implementations§
impl<P, R> Freeze for ManagedException<P, R>where
P: Freeze,
impl<P, R> RefUnwindSafe for ManagedException<P, R>where
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<P, R> Send for ManagedException<P, R>
impl<P, R> Sync for ManagedException<P, R>
impl<P, R> Unpin for ManagedException<P, R>where
P: Unpin,
impl<P, R> UnsafeUnpin for ManagedException<P, R>where
P: UnsafeUnpin,
impl<P, R> UnwindSafe for ManagedException<P, R>where
R: RefUnwindSafe,
P: UnwindSafe,
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