RawReportMut

Struct RawReportMut 

Source
#[repr(transparent)]
pub struct RawReportMut<'a> { ptr: NonNull<ReportData<Erased>>, _marker: PhantomData<&'a mut ReportData<Erased>>, }
Expand description

A mutable lifetime-bound pointer to a ReportData that is guaranteed to point to an initialized instance of a ReportData<C> for some specific C, though we do not know which actual C it is.

We cannot use a &'a mut ReportData<C> directly, because that would require us to know the actual type of the context, which we do not.

Fields§

§ptr: NonNull<ReportData<Erased>>§_marker: PhantomData<&'a mut ReportData<Erased>>

Implementations§

Source§

impl<'a> RawReportMut<'a>

Source

pub fn children_mut(self) -> &'a mut Vec<RawReport>

Gets a mutable reference to the child reports.

Source

pub fn attachments_mut(self) -> &'a mut Vec<RawAttachment>

Gets a mutable reference to the attachments.

§Safety

The caller must ensure that this is the only existing reference pointing to the inner ReportData.

Source§

impl<'a> RawReportMut<'a>

Source

pub fn reborrow<'b>(&'b mut self) -> RawReportMut<'b>

Reborrows the mutable reference to the ReportData with a shorter lifetime.

Source

pub fn as_ref(&self) -> RawReportRef<'_>

Returns a reference to the ReportData instance.

Source

pub fn into_ref(self) -> RawReportRef<'a>

Consumes the mutable reference and returns an immutable one with the same lifetime.

Source

pub(super) fn into_mut_ptr(self) -> *mut ReportData<Erased>

Consumes this RawReportMut and returns a raw mutable pointer to the underlying ReportData.

This method is primarily used for internal operations that require direct pointer access.

Auto Trait Implementations§

§

impl<'a> Freeze for RawReportMut<'a>

§

impl<'a> RefUnwindSafe for RawReportMut<'a>

§

impl<'a> !Send for RawReportMut<'a>

§

impl<'a> !Sync for RawReportMut<'a>

§

impl<'a> Unpin for RawReportMut<'a>

§

impl<'a> !UnwindSafe for RawReportMut<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.