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) -> ManagedException<P, R>
pub const fn new(payload: P) -> ManagedException<P, R>
Creates an exception payload with the managed node’s standard edge limits.
Sourcepub const fn with_edge_limits(
payload: P,
limits: EdgeLimits,
) -> ManagedException<P, R>
pub const fn with_edge_limits( payload: P, limits: EdgeLimits, ) -> ManagedException<P, R>
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, R> Clone for ManagedException<P, R>
impl<P, R> 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 moreSource§impl<P, R> Debug for ManagedException<P, R>
impl<P, R> Debug for ManagedException<P, R>
impl<P, R> 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.
Source§impl<P, R> PartialEq for ManagedException<P, R>
impl<P, R> PartialEq for ManagedException<P, R>
impl<P, R> 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more