#[repr(transparent)]
pub struct RefExtended<T: ?Sized>(_);
Expand description

This struct extends reference of value as long as lifetime of value

Dropping this value will abort process to ensure the lifetime of reference

Implementations§

Returns reference with lifetime of value

This method is unsafe because

  • It can create immutable reference while having mutable reference

Returns mutable reference with lifetime of value

This method is unsafe because

  • It can create mutable reference while having immutable references
  • It can create multiple mutable reference

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.