pub(crate) enum RDataHelper {
Fields,
Get,
Set,
NoField,
ErrorClass,
EveryRead,
Live,
}Expand description
The R helpers #[derive(ExternalPtr)] emits for a type’s sidecar fields
and the $ / [[ field methods of r_data_accessors call (#1848).
Variants§
Fields
.rdata_fields_<Type>: the field names, a character vector.
Get
.rdata_get_<Type>(x, name): the field’s getter .Call().
Set
.rdata_set_<Type>(x, name, value): the field’s setter .Call().
NoField
.rdata_no_field_<Type>(name, env, cls): the miniextendr_no_field
error, naming the R class cls the method serves.
ErrorClass
.rdata_error_class_<Type>: the classes the field methods put in
front of their own errors, #[externalptr(field_error(class = ...))]
(#1899); NULL without them.
EveryRead
.rdata_every_read_<Type>: TRUE for a type with
restored(refuse = "every_read") (#1901), else FALSE; it gates the
field methods’ calls of RDataHelper::Live.
Live
.rdata_live_<Type>(x, raise): the liveness check of a type with
restored(refuse = "every_read") (#1901). Other types get a stub that
is never called (gated by RDataHelper::EveryRead), so a binding
the methods call is always a function, as R CMD check expects.
Trait Implementations§
Source§impl Clone for RDataHelper
impl Clone for RDataHelper
impl Copy for RDataHelper
Source§impl Debug for RDataHelper
impl Debug for RDataHelper
impl TrivialClone for RDataHelper
Auto Trait Implementations§
impl Freeze for RDataHelper
impl RefUnwindSafe for RDataHelper
impl Send for RDataHelper
impl Sync for RDataHelper
impl Unpin for RDataHelper
impl UnsafeUnpin for RDataHelper
impl UnwindSafe for RDataHelper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Printable for T
Source§impl<T> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
core_io_internals)[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read moreLayout§
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: 1 byte
Size for each variant:
Fields: 0 bytesGet: 0 bytesSet: 0 bytesNoField: 0 bytesErrorClass: 0 bytesEveryRead: 0 bytesLive: 0 bytes