pub struct Mutable;Expand description
Marker type for owned reports with unique ownership.
This marker is used exclusively with Report<C, Mutable, T> (not
ReportRef). It indicates that the report has unique ownership of its
data, which allows mutation operations but prevents cloning.
§Available Operations
With Mutable ownership, you can:
- Add attachments with
attach - Add parent context with
context - Get mutable access with
as_mut - Convert to
Cloneablewithinto_cloneable
§Examples
use rootcause::prelude::*;
let report: Report<String, markers::Mutable> = report!("Database error".to_string());
// Can add attachments (consumes and returns the report)
let report: Report<String, markers::Mutable> = report.attach("connection timeout");
// Can add parent context
let report: Report<String, markers::Mutable> =
report.context("Failed to fetch user data".to_string());
// Cannot clone - Mutable reports don't implement Clone
// let cloned = report.clone(); // ❌ Won't compileTrait Implementations§
Source§impl Ord for Mutable
impl Ord for Mutable
Source§impl PartialOrd for Mutable
impl PartialOrd for Mutable
Source§impl ReportOwnershipMarker for Mutable
impl ReportOwnershipMarker for Mutable
Source§type RefMarker = Uncloneable
type RefMarker = Uncloneable
The ownership marker for references to this report type. Read more
impl Copy for Mutable
impl Eq for Mutable
impl StructuralPartialEq for Mutable
Auto Trait Implementations§
impl Freeze for Mutable
impl RefUnwindSafe for Mutable
impl Send for Mutable
impl Sync for Mutable
impl Unpin for Mutable
impl UnwindSafe for Mutable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.