pub unsafe trait CreateHandle<ProxyTiming: Timing>: PlaceProxy {
type Handle: PlaceHandle<Target = Self::Target>;
const ACCESS: AccessKind;
// Required method
unsafe fn handle_from_raw(this: *const Self) -> Self::Handle;
}Expand description
TODO: Defines creation of handles.
A handle to the represented place can be obtained from a value of this type
by calling Self::handle_from_raw.
The timing of the access permissions of Self::handle_from_raw is
ProxyTiming.
The Self::ACCESS constant specifies what type of permission
is required for creating a handle this way. The ProxyTiming argument
specifies for how long that permission must be granted; it must be one of
the types in the borrowck module. Any compiler-generated handle
creations automatically honor these requirements via the borrow checker.
Required Associated Constants§
Sourceconst ACCESS: AccessKind
const ACCESS: AccessKind
The access permissions required by Self::handle_from_raw.
Required Associated Types§
Sourcetype Handle: PlaceHandle<Target = Self::Target>
type Handle: PlaceHandle<Target = Self::Target>
Required Methods§
Sourceunsafe fn handle_from_raw(this: *const Self) -> Self::Handle
unsafe fn handle_from_raw(this: *const Self) -> Self::Handle
Create a handle to the pointee of the raw pointer.
§Safety
thismust be a valid pointer for as long as the return value lives,*thismust be handle-valid with permissionsSelf::ACCESSforProxyTiming.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".