Skip to main content

AtomicSafeBorrowMut

Trait AtomicSafeBorrowMut 

Source
pub(crate) trait AtomicSafeBorrowMut {
    type Target;

    // Required method
    fn safe_borrow_mut<'a: 'b, 'b>(
        &'a self,
        no_gc: &'b NoGC,
    ) -> AtomicRefMutNoGC<'b, Self::Target>;
}

Required Associated Types§

Required Methods§

Source

fn safe_borrow_mut<'a: 'b, 'b>( &'a self, no_gc: &'b NoGC, ) -> AtomicRefMutNoGC<'b, Self::Target>

A version of [DomRefCell::safe_borrow_mut] for AtomicRefCell. The resulting borrowed mutable reference statically guarantees that no garbage collection can occur while the borrow is live.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> AtomicSafeBorrowMut for AtomicRefCell<T>

Source§

type Target = T

Source§

fn safe_borrow_mut<'a: 'b, 'b>( &'a self, no_gc: &'b NoGC, ) -> AtomicRefMutNoGC<'b, Self::Target>

Implementors§