Skip to main content

WritePlace

Trait WritePlace 

Source
pub unsafe trait WritePlace: PlaceHandle {
    const ACCESS: AccessKind;
    const SAFE: bool;

    // Required method
    unsafe fn write_place(self, value: Self::Target);
}
Expand description

place = value; – Write to a place.

Writing to a place is done by writing the place on the left hand side of an assignment expression.

Required Associated Constants§

Source

const ACCESS: AccessKind

The access permissions to the place required by Self::write_place.

Source

const SAFE: bool

Whether Self::write_place is safe when Self::ACCESS is honored.

This constant controls whether the compiler will require writing an unsafe block around writing to a place that uses this handle.

Required Methods§

Source

unsafe fn write_place(self, value: Self::Target)

Write to the place.

§Safety

This handle must have Self::ACCESS permissions for the duration of this method call.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> WritePlace for *mut T

Source§

const ACCESS: AccessKind = AccessKind::Untracked

Source§

const SAFE: bool = false

Source§

unsafe fn write_place(self, value: Self::Target)

Source§

impl<T> WritePlace for NonNull<T>

Source§

const ACCESS: AccessKind = AccessKind::Exclusive

Source§

const SAFE: bool = false

Source§

unsafe fn write_place(self, value: Self::Target)

Implementors§

Source§

impl<H> WritePlace for PinnedHandle<H>
where H: WritePlace, H::Target: Sized,

Source§

const ACCESS: AccessKind = H::ACCESS

Source§

const SAFE: bool = H::SAFE

Source§

impl<T> WritePlace for BoxHandle<T>

Source§

const ACCESS: AccessKind = AccessKind::Exclusive

Source§

const SAFE: bool = true

Source§

impl<T> WritePlace for LocalHandle<T>

Source§

const ACCESS: AccessKind = AccessKind::Exclusive

Source§

const SAFE: bool = true

Source§

impl<T> WritePlace for MutHandle<'_, T>

Source§

const ACCESS: AccessKind = AccessKind::Exclusive

Source§

const SAFE: bool = true