Skip to main content

SEXPTYPE

Enum SEXPTYPE 

Source
#[non_exhaustive]
#[repr(u32)]
pub enum SEXPTYPE {
Show 27 variants NILSXP = 0, SYMSXP = 1, LISTSXP = 2, CLOSXP = 3, ENVSXP = 4, PROMSXP = 5, LANGSXP = 6, SPECIALSXP = 7, BUILTINSXP = 8, CHARSXP = 9, LGLSXP = 10, INTSXP = 13, REALSXP = 14, CPLXSXP = 15, STRSXP = 16, DOTSXP = 17, ANYSXP = 18, VECSXP = 19, EXPRSXP = 20, BCODESXP = 21, EXTPTRSXP = 22, WEAKREFSXP = 23, RAWSXP = 24, S4SXP = 25, NEWSXP = 30, FREESXP = 31, FUNSXP = 99,
}
Expand description

R S-expression tag values (SEXPTYPE).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

NILSXP = 0

nil = NULL

§

SYMSXP = 1

symbols

§

LISTSXP = 2

lists of dotted pairs

§

CLOSXP = 3

closures

§

ENVSXP = 4

environments

§

PROMSXP = 5

promises: [un]evaluated closure arguments

§

LANGSXP = 6

language constructs (special lists)

§

SPECIALSXP = 7

special forms

§

BUILTINSXP = 8

builtin non-special forms

§

CHARSXP = 9

“scalar” string type (internal only)

§

LGLSXP = 10

logical vectors

§

INTSXP = 13

integer vectors

§

REALSXP = 14

real variables

§

CPLXSXP = 15

complex variables

§

STRSXP = 16

string vectors

§

DOTSXP = 17

dot-dot-dot object

§

ANYSXP = 18

make “any” args work

§

VECSXP = 19

generic vectors

§

EXPRSXP = 20

expressions vectors

§

BCODESXP = 21

byte code

§

EXTPTRSXP = 22

external pointer

§

WEAKREFSXP = 23

weak reference

§

RAWSXP = 24

raw bytes

§

S4SXP = 25

S4 non-vector

§

NEWSXP = 30

fresh node created in new page

§

FREESXP = 31

node released by GC

§

FUNSXP = 99

Closure or Builtin

Implementations§

Source§

impl SEXPTYPE

Source

pub const OBJSXP: SEXPTYPE = SEXPTYPE::S4SXP

Alias for S4SXP (value 25).

R defines both OBJSXP and S4SXP as value 25. S4SXP is retained for backwards compatibility; OBJSXP is the preferred name.

Source

pub fn type_name(self) -> &'static str

Get R’s name for this SEXPTYPE (e.g. "double", "integer", "list").

Returns the same string as R’s typeof() function.

Trait Implementations§

Source§

impl Clone for SEXPTYPE

Source§

fn clone(&self) -> SEXPTYPE

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SEXPTYPE

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for SEXPTYPE

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SEXPTYPE

Source§

fn eq(&self, other: &SEXPTYPE) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for SEXPTYPE

Source§

impl Eq for SEXPTYPE

Source§

impl StructuralPartialEq for SEXPTYPE

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> RClone for T
where T: Clone,

Source§

fn clone(&self) -> T

Create a deep copy of this value.
Source§

impl<T> RCopy for T
where T: Copy,

Source§

fn copy(&self) -> T

Create a bitwise copy of this value. Read more
Source§

fn is_copy(&self) -> bool

Check if this type implements Copy. Read more
Source§

impl<T> RDebug for T
where T: Debug,

Source§

fn debug_str(&self) -> String

Get a compact debug string representation.
Source§

fn debug_str_pretty(&self) -> String

Get a pretty-printed debug string with indentation.
Source§

impl<T> RHash for T
where T: Hash,

Source§

fn hash(&self) -> i64

Compute a hash of this value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.