Skip to main content

SendableDataPtr

Type Alias SendableDataPtr 

Source
type SendableDataPtr = Sendable<*mut u8>;
Expand description

Wrapper to make *mut u8 pointers Send for cross-thread routing.

Unlike SendablePtr<T> in externalptr, this allows null pointers since allocator operations can fail and return null.

§Safety

Same safety model as Sendable<T> and SendablePtr:

  • The pointer value (memory address) is safely transmitted between threads
  • The pointer is only dereferenced on R’s main thread
  • This is guaranteed by the with_r_thread_or_inline routing mechanism

Aliased Type§

#[repr(transparent)]
struct SendableDataPtr(pub *mut u8);

Tuple Fields§

§0: *mut u8

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 8 bytes