Skip to main content

Sendable

Struct Sendable 

Source
#[doc(hidden)]
#[repr(transparent)]
pub struct Sendable<T>(pub T);
Expand description

Wrapper to mark values as Send for main-thread routing.

Only safe if the value is not accessed on the worker thread and is used exclusively on the main thread.

Tuple Fields§

§0: T

Trait Implementations§

Source§

impl<T: Clone> Clone for Sendable<T>

Source§

fn clone(&self) -> Sendable<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl From<Sendable<SEXP>> for SEXP

Source§

fn from(s: Sendable<SEXP>) -> Self

Converts to this type from the input type.
Source§

impl IntoR for Sendable<SEXP>

Source§

type Error = Infallible

The error type for fallible conversions. Read more
Source§

fn try_into_sexp(self) -> Result<SEXP, Self::Error>

Try to convert this value to an R SEXP. Read more
Source§

unsafe fn try_into_sexp_unchecked(self) -> Result<SEXP, Self::Error>

Try to convert to SEXP without thread safety checks. Read more
Source§

fn into_sexp(self) -> SEXP

Convert this value to an R SEXP, panicking on error. Read more
Source§

unsafe fn into_sexp_unchecked(self) -> SEXP
where Self: Sized,

Convert to SEXP without thread safety checks, panicking on error. Read more
Source§

impl<T: Copy> Copy for Sendable<T>

Source§

impl<T> Send for Sendable<T>

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.