[][src]Struct abi_stable::sabi_types::RMut

#[repr(transparent)]pub struct RMut<'a, T> { /* fields omitted */ }

Equivalent to &mut T.

Implementations

impl<'a, T> RMut<'a, T>[src]

pub unsafe fn from_raw(ref_: *mut T) -> Self where
    T: 'a, 
[src]

Constructs this RMut from a raw pointer.

Safety

You must ensure that the raw pointer is valid for the 'a lifetime, and that this is the only active pointer to that value.

pub fn new(ref_: &'a mut T) -> Self[src]

Constructs this RMut from a mutable reference

pub fn reborrow(&mut self) -> RMut<'_, T>[src]

Reborrows this RMut, with a shorter lifetime.

pub fn get(self) -> &'a T[src]

Gets access to the reference.

Use this to get a &'a T, instead of a reference borrowing from the pointer.

pub fn get_mut(self) -> &'a mut T[src]

Gets access to the mutable reference.

Use this to get a &'a mut T, instead of a reference borrowing from the pointer.

pub fn into_raw(self) -> *mut T[src]

Gets access to the referenced value,as a raw pointer.

pub fn cast_into_raw<U>(self) -> *mut U[src]

Accesses the referenced value as a casted raw pointer.

Trait Implementations

impl<'a, T, U> CanTransmuteElement<U> for RMut<'a, T> where
    U: 'a, 
[src]

type TransmutedPtr = RMut<'a, U>

The type of the pointer after it's element type has been changed.

impl<'a, T> Debug for RMut<'a, T> where
    T: Debug
[src]

impl<'a, T> Deref for RMut<'a, T>[src]

type Target = T

The resulting type after dereferencing.

impl<'a, T> DerefMut for RMut<'a, T>[src]

impl<'a, T> Display for RMut<'a, T> where
    T: Display
[src]

impl<'a, T> Eq for RMut<'a, T> where
    T: Eq
[src]

impl<'a, T> GetPointerKind for RMut<'a, T>[src]

type Kind = PK_MutReference

The kind of the pointer.

impl<'a, T> GetStaticEquivalent_ for RMut<'a, T> where
    T: __StableAbi,
    T: 'a, 
[src]

type StaticEquivalent = _static_RMut<'static, __GetStaticEquivalent<T>>

impl<'a, T> Hash for RMut<'a, T> where
    T: Hash
[src]

impl<'a, T> Ord for RMut<'a, T> where
    T: Ord
[src]

impl<'a, T> PartialEq<RMut<'a, T>> for RMut<'a, T> where
    T: PartialEq
[src]

impl<'a, T> PartialOrd<RMut<'a, T>> for RMut<'a, T> where
    T: PartialOrd
[src]

impl<'a, T> Send for RMut<'a, T> where
    &'a T: Send
[src]

impl<'a, T> StableAbi for RMut<'a, T> where
    T: __StableAbi,
    T: 'a, 
[src]

type IsNonZeroType = <NonNull<T> as __StableAbi>::IsNonZeroType

Whether this type has a single invalid bit-pattern. Read more

impl<'a, T> Sync for RMut<'a, T> where
    &'a T: Sync
[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for RMut<'a, T> where
    T: RefUnwindSafe
[src]

impl<'a, T> Unpin for RMut<'a, T>[src]

impl<'a, T> !UnwindSafe for RMut<'a, T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> GetWithMetadata for T[src]

type ForSelf = WithMetadata_<T, T>

This is always WithMetadata_<Self, Self>

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SelfOps for T where
    T: ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<This> TransmuteElement for This where
    This: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The error type returned when the conversion fails.

impl<T> TypeIdentity for T where
    T: ?Sized
[src]

type Type = T

The same type as Self. Read more