pub struct Expressions {
pub(crate) robj: Robj,
}
Fields§
§robj: Robj
Implementations§
Source§impl Expressions
impl Expressions
Sourcepub fn from_values<V>(values: V) -> Self
pub fn from_values<V>(values: V) -> Self
Wrapper for creating Expressions (EXPRSXP) objects.
use extendr_api::prelude::*;
test! {
let expr = r!(Expressions::from_values(&[r!(0), r!(1), r!(2)]));
assert_eq!(expr.is_expressions(), true);
assert_eq!(expr.len(), 3);
}
Trait Implementations§
Source§impl Clone for Expressions
impl Clone for Expressions
Source§fn clone(&self) -> Expressions
fn clone(&self) -> Expressions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Conversions for Expressions
impl Conversions for Expressions
as_*()
Source§fn as_language(&self) -> Option<Language>
fn as_language(&self) -> Option<Language>
Convert a language object to a Language wrapper. Read more
Source§fn as_pairlist(&self) -> Option<Pairlist>
fn as_pairlist(&self) -> Option<Pairlist>
Convert a pair list object (LISTSXP) to a Pairlist wrapper. Read more
Source§fn as_expressions(&self) -> Option<Expressions>
fn as_expressions(&self) -> Option<Expressions>
Convert an expression object (EXPRSXP) to a Expr wrapper. Read more
Source§fn as_environment(&self) -> Option<Environment>
fn as_environment(&self) -> Option<Environment>
Convert an environment object (ENVSXP) to a Env wrapper. Read more
Source§fn as_function(&self) -> Option<Function>
fn as_function(&self) -> Option<Function>
Convert a function object (CLOSXP) to a Function wrapper. Read more
Source§fn as_promise(&self) -> Option<Promise>
fn as_promise(&self) -> Option<Promise>
Get a wrapper for a promise.
Source§impl Debug for Expressions
impl Debug for Expressions
Source§impl Default for Expressions
impl Default for Expressions
Source§impl From<&Expressions> for Robj
impl From<&Expressions> for Robj
Source§fn from(val: &Expressions) -> Self
fn from(val: &Expressions) -> Self
Make an robj from a wrapper.
Source§impl From<Expressions> for Robj
impl From<Expressions> for Robj
Source§fn from(val: Expressions) -> Self
fn from(val: Expressions) -> Self
Make an robj from a wrapper.
Source§impl GetSexp for Expressions
impl GetSexp for Expressions
Source§impl Length for Expressions
impl Length for Expressions
len() and is_empty()
Source§impl Operators for Expressions
impl Operators for Expressions
dollar() etc.
Source§impl PartialEq for Expressions
impl PartialEq for Expressions
Source§impl Rinternals for Expressions
impl Rinternals for Expressions
find_var() etc.
Source§fn is_logical(&self) -> bool
fn is_logical(&self) -> bool
Return true if this is a boolean (logical) vector
Source§fn is_complex(&self) -> bool
fn is_complex(&self) -> bool
Return true if this is a complex vector.
Source§fn is_expressions(&self) -> bool
fn is_expressions(&self) -> bool
Return true if this is an expression.
Source§fn is_environment(&self) -> bool
fn is_environment(&self) -> bool
Return true if this is an environment.
Source§fn is_promise(&self) -> bool
fn is_promise(&self) -> bool
Return true if this is an environment.
Source§fn is_external_pointer(&self) -> bool
fn is_external_pointer(&self) -> bool
Return true if this is an expression.
Source§fn get_current_srcref(val: i32) -> Robj
fn get_current_srcref(val: i32) -> Robj
Get the source ref.
Source§fn get_src_filename(&self) -> Robj
fn get_src_filename(&self) -> Robj
Get the source filename.
Source§fn as_character_vector(&self) -> Robj
fn as_character_vector(&self) -> Robj
Convert to a string vector.
Source§fn coerce_vector(&self, sexptype: SEXPTYPE) -> Robj
fn coerce_vector(&self, sexptype: SEXPTYPE) -> Robj
Convert to vectors of many kinds.
Source§fn pair_to_vector_list(&self) -> Robj
fn pair_to_vector_list(&self) -> Robj
Convert a pairlist (LISTSXP) to a vector list (VECSXP).
Source§fn vector_to_pair_list(&self) -> Robj
fn vector_to_pair_list(&self) -> Robj
Convert a vector list (VECSXP) to a pair list (LISTSXP)
Source§fn as_character_factor(&self) -> Robj
fn as_character_factor(&self) -> Robj
Convert a factor to a string vector.
Source§fn duplicate(&self) -> Robj
fn duplicate(&self) -> Robj
Do a deep copy of this object.
Note that clone() only adds a reference.
Source§fn find_function<K: TryInto<Symbol, Error = Error>>(
&self,
key: K,
) -> Result<Robj>
fn find_function<K: TryInto<Symbol, Error = Error>>( &self, key: K, ) -> Result<Robj>
Find a function in an environment ignoring other variables. Read more
Source§fn find_var<K: TryInto<Symbol, Error = Error>>(&self, key: K) -> Result<Robj>
fn find_var<K: TryInto<Symbol, Error = Error>>(&self, key: K) -> Result<Robj>
Find a variable in an environment. Read more
Source§fn xlengthgets(&self, new_len: usize) -> Result<Robj>
fn xlengthgets(&self, new_len: usize) -> Result<Robj>
Copy a vector and resize it.
See. https://github.com/hadley/r-internals/blob/master/vectors.md
Source§fn alloc_vector(sexptype: SEXPTYPE, len: usize) -> Robj
fn alloc_vector(sexptype: SEXPTYPE, len: usize) -> Robj
Allocated an owned object of a certain type.
Source§fn is_function(&self) -> bool
fn is_function(&self) -> bool
Return true if this is a function or a primitive (CLOSXP, BUILTINSXP or SPECIALSXP)
Source§fn is_integer(&self) -> bool
fn is_integer(&self) -> bool
Return true if this is an integer vector (INTSXP) but not a factor.
Source§fn is_language(&self) -> bool
fn is_language(&self) -> bool
Return true if this is a language object (LANGSXP).
Source§fn is_pairlist(&self) -> bool
fn is_pairlist(&self) -> bool
Return true if this is NILSXP or LISTSXP.
Source§fn is_number(&self) -> bool
fn is_number(&self) -> bool
Return true if this is INTSXP, LGLSXP or REALSXP but not a factor.
Source§fn is_primitive(&self) -> bool
fn is_primitive(&self) -> bool
Return true if this is a primitive function BUILTINSXP, SPECIALSXP.
Source§fn is_user_binop(&self) -> bool
fn is_user_binop(&self) -> bool
Return true if this is a user defined binop.
Source§fn is_vector_atomic(&self) -> bool
fn is_vector_atomic(&self) -> bool
Return true if this is an atomic vector.
Source§fn is_vector_list(&self) -> bool
fn is_vector_list(&self) -> bool
Return true if this is a vector list.
Source§fn is_vectorizable(&self) -> bool
fn is_vectorizable(&self) -> bool
Return true if this is can be made into a vector.
fn is_missing_arg(&self) -> bool
fn is_unbound_value(&self) -> bool
fn is_package_env(&self) -> bool
fn package_env_name(&self) -> Robj
fn is_namespace_env(&self) -> bool
fn namespace_env_spec(&self) -> Robj
Source§fn is_altinteger(&self) -> bool
fn is_altinteger(&self) -> bool
Returns
true
if this is an integer ALTREP object.Source§fn is_altreal(&self) -> bool
fn is_altreal(&self) -> bool
Returns
true
if this is an real ALTREP object.Source§fn is_altlogical(&self) -> bool
fn is_altlogical(&self) -> bool
Returns
true
if this is an logical ALTREP object.Source§fn is_altstring(&self) -> bool
fn is_altstring(&self) -> bool
Returns
true
if this is an integer ALTREP object.Source§fn is_altlist(&self) -> bool
fn is_altlist(&self) -> bool
Returns
true
if this is an integer ALTREP object.Source§impl Serialize for Expressions
impl Serialize for Expressions
Source§impl Slices for Expressions
impl Slices for Expressions
as_typed_slice_raw() etc.
Source§unsafe fn as_typed_slice_raw<T>(&self) -> &[T]
unsafe fn as_typed_slice_raw<T>(&self) -> &[T]
Get an immutable slice to this object’s data. Read more
Source§unsafe fn as_typed_slice_raw_mut<T>(&mut self) -> &mut [T]
unsafe fn as_typed_slice_raw_mut<T>(&mut self) -> &mut [T]
Get a mutable slice to this object’s data. Read more
Source§impl TryFrom<&Robj> for Expressions
impl TryFrom<&Robj> for Expressions
Source§impl TryFrom<Robj> for Expressions
impl TryFrom<Robj> for Expressions
Source§impl Types for Expressions
impl Types for Expressions
rtype() and rany()
impl StructuralPartialEq for Expressions
Auto Trait Implementations§
impl Freeze for Expressions
impl RefUnwindSafe for Expressions
impl !Send for Expressions
impl !Sync for Expressions
impl Unpin for Expressions
impl UnwindSafe for Expressions
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more