pub trait TryFromSexp: Sized {
type Error;
const NATIVE_BORROW: Option<NativeBorrow> = None;
const CHARACTER_ONLY: bool = false;
#[doc(hidden)] const __MX_EXPECTATION: Option<&'static str> = None;
// Required method
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>;
// Provided methods
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error> { ... }
#[doc(hidden)] unsafe fn __mx_try_from_rooted(root: Root<'_>) -> Result<Self, Self::Error> { ... }
#[doc(hidden)] fn __mx_has_na(&self) -> bool { ... }
#[doc(hidden)] fn __mx_input_has_na(&self, input: SEXP) -> bool { ... }
#[doc(hidden)] fn __mx_try_from_sexp_with_check(
sexp: SEXP,
check: &ElementCheck<'_>,
) -> Result<Self, SexpError>
where Self::Error: Into<SexpError> { ... }
#[doc(hidden)] unsafe fn __mx_try_from_sexp_unchecked_with_check(
sexp: SEXP,
check: &ElementCheck<'_>,
) -> Result<Self, SexpError>
where Self::Error: Into<SexpError> { ... }
}Expand description
TryFrom-style trait for converting SEXP to Rust types.
Inbound counterpart of crate::into_r::IntoR. Strict by construction
(returns Result) — for a looser, multi-source coercion path use
crate::coerce::Coerce / crate::coerce::TryCoerce.
§Examples
use miniextendr_api::SEXP;
use miniextendr_api::from_r::TryFromSexp;
fn example(sexp: SEXP) {
let value: i32 = TryFromSexp::try_from_sexp(sexp).unwrap();
let text: String = TryFromSexp::try_from_sexp(sexp).unwrap();
}Provided Associated Constants§
Sourceconst NATIVE_BORROW: Option<NativeBorrow> = None
const NATIVE_BORROW: Option<NativeBorrow> = None
Native vector storage retained by this conversion, if any.
Generated wrappers use this before conversion to reject aliased mutable borrows. Owned and custom object conversions default to no native borrow. Conversions that retain native references must describe their leaf and forward this metadata through their containers.
Sourceconst CHARACTER_ONLY: bool = false
const CHARACTER_ONLY: bool = false
Whether this conversion accepts only character input: every value it
converts, other than NULL, is a character vector or a factor.
#[miniextendr] reads it for choice parameters (match_arg /
choices) typed Either<T, R>. Their R wrapper sends all character
and factor input to the choice T, so an R with
CHARACTER_ONLY = true could receive at most NULL, and the macro
rejects the signature at compile time.
Defaults to false, which is always safe: the check is skipped. Set it
to true in an implementation that reads only strings or factors, and
forward it (<Inner as TryFromSexp>::CHARACTER_ONLY) in one that
delegates to another conversion. Do not set it on a type that also
converts numbers, logicals or lists: that would reject valid
parameters.
The built-in string and factor conversions (including the types given
try_from_sexp_via_str_parse!,
such as uuid, url, regex and num-bigint), #[derive(MatchArg)] and
#[derive(RFactor)] set it. Option<T>, Vec<T>, Box<[T]>,
Missing<T> and #[derive(TryFromSexp)] newtypes
forward it. AsCharacter leaves it false,
since it also converts numbers.
§Examples
use miniextendr_api::SEXP;
use miniextendr_api::from_r::{SexpError, TryFromSexp};
pub struct Username(String);
impl TryFromSexp for Username {
type Error = SexpError;
const CHARACTER_ONLY: bool = <String as TryFromSexp>::CHARACTER_ONLY;
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error> {
String::try_from_sexp(sexp).map(Username)
}
}Source#[doc(hidden)]const __MX_EXPECTATION: Option<&'static str> = None
#[doc(hidden)]const __MX_EXPECTATION: Option<&'static str> = None
What an argument of this type must be, in R terms, when
#[miniextendr] cannot tell from the type as written: the
<expected> of a failed conversion’s '<p>' must be <expected>: ....
#[derive(TryFromSexp)] sets it from the newtype’s inner type
(struct Dose(AsNumeric) says a single number, as AsNumeric
does) or forwards the inner type’s. The generated wrapper reads it on
the failure path of a parameter whose type the macro does not know,
alone or as an arm of an Either. None (the default) leaves the
expectation to the conversion error, else invalid '<p>' argument.
Required Associated Types§
Required Methods§
Sourcefn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Attempt to convert an R SEXP to this Rust type.
In debug builds, may assert that we’re on R’s main thread.
Provided Methods§
Sourceunsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Convert from SEXP without thread safety checks.
§Safety
Must be called from R’s main thread. In debug builds, this still calls the checked version by default, but implementations may skip thread assertions for performance.
Source#[doc(hidden)]unsafe fn __mx_try_from_rooted(root: Root<'_>) -> Result<Self, Self::Error>
#[doc(hidden)]unsafe fn __mx_try_from_rooted(root: Root<'_>) -> Result<Self, Self::Error>
Convert with a scope able to retain uncached ALTREP elements. Custom reference converters keep their existing behavior by default.
§Safety
R’s main thread. Any R-backed references in the result must be narrowed
to the lifetime of root; this hook does not change Self’s lifetime.
Source#[doc(hidden)]fn __mx_has_na(&self) -> bool
#[doc(hidden)]fn __mx_has_na(&self) -> bool
Whether the converted argument holds a value #[miniextendr(no_na)]
refuses after the conversion.
The default is false, because no_na’s R guard (!anyNA(x)) already
refuses R’s NA before the conversion runs. The reading markers
(AsNumeric*, AsCharacter*) override it: they read more inputs as
missing than anyNA() sees (the text "NA", blank strings, a factor
NA level, …). The layers a marker can sit in (Option, Missing,
the named-list maps, Result<T, ()>, Either, #[derive(TryFromSexp)]
newtypes) forward it, so a type alias or a newtype of a marker is
checked too. The generated C wrapper calls it on the value of every
no_na parameter that has the R guard.
Source#[doc(hidden)]fn __mx_input_has_na(&self, input: SEXP) -> bool
#[doc(hidden)]fn __mx_input_has_na(&self, input: SEXP) -> bool
Whether #[miniextendr(no_na)] refuses this converted argument, read
from input (the R value it converted from), when no R guard ran.
An Either parameter gets no !anyNA(x) guard: one test on the whole
argument is wrong for an arm with its own reading of NA, such as a
data frame whose cells may be missing. Its C wrapper calls this instead
of __mx_has_na. The default makes the guard’s
check in Rust (R’s anyNA(input)), then asks __mx_has_na for what a
marker reads as NA beyond it. Either asks the arm the value
converted to, Missing asks its value, and DataFrame refuses
nothing, so the NA cells of a data frame arm get through. The wrappers
Result<T, ()>, Option<DataFrame>, Option<Either<L, R>> and
#[derive(TryFromSexp)] newtypes ask their value too, so a
Result<DataFrame, ()> or Option<DataFrame> arm, a newtype of a
DataFrame, or the data frame arm of an Option<Either<..>> keeps its
NA cells as well. Their Err(()) / None comes only from NULL,
which holds no NA, so it passes.
An Option arm over a scalar (Either<Option<AsNumeric>, DataFrame>)
keeps the default, which reads the input rather than the value: NULL
holds no NA and passes as None, while an NA the arm reads as
None (Option<f64>, Option<String>) is still refused. An override
that answered false for None would let that NA through; the
overrides above can, since their None is never an NA.
Source#[doc(hidden)]fn __mx_try_from_sexp_with_check(
sexp: SEXP,
check: &ElementCheck<'_>,
) -> Result<Self, SexpError>
#[doc(hidden)]fn __mx_try_from_sexp_with_check(
sexp: SEXP,
check: &ElementCheck<'_>,
) -> Result<Self, SexpError>
Convert, running check, an element type’s
TryFromSexpElement::check_sexp,
on the R value that carries an element’s class (#1837).
The newtype containers read Vec<T> through Vec<T::Inner> and
Vec<Option<T>> through Vec<Option<T::Inner>> with this, passing
T::check_sexp, so the inner container decides where the check runs:
- The default runs it once, on the whole input, then converts. An atomic vector carries its class on the vector.
- A list of R objects runs it on each element instead, where each
object carries its own class:
Vec<List>on every element,Vec<Option<List>>on every element butNULL. - The newtype containers pass it on, with their own element’s check after it, so a newtype of a newtype checks outer then inner, as its scalar does.
An override must also override
__mx_try_from_sexp_unchecked_with_check.
Not public API.
Source#[doc(hidden)]unsafe fn __mx_try_from_sexp_unchecked_with_check(
sexp: SEXP,
check: &ElementCheck<'_>,
) -> Result<Self, SexpError>
#[doc(hidden)]unsafe fn __mx_try_from_sexp_unchecked_with_check(
sexp: SEXP,
check: &ElementCheck<'_>,
) -> Result<Self, SexpError>
__mx_try_from_sexp_with_check
through try_from_sexp_unchecked.
Not public API.
§Safety
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl TryFromSexp for &'static str
Convert R character vector (STRSXP) to Rust &str.
impl TryFromSexp for &'static str
Convert R character vector (STRSXP) to Rust &str.
Extracts the first element of the character vector and returns it as a UTF-8 string. The Rust type uses a static lifetime for API convenience, but the borrow is only valid while the source CHARSXP remains reachable.
§NA Handling
Warning: NA_character_ is converted to empty string "". This is lossy!
If you need to distinguish between NA and empty strings, use Option<String> instead:
let maybe_str: Option<String> = sexp.try_into()?;§Safety
The returned &str is only valid as long as R doesn’t garbage collect the CHARSXP.
For ALTSTRING inputs, rooting the source alone may not retain its elements.
Use TryFromRoot to retain uncached elements for the call’s scope.
Source§impl TryFromSexp for Arc<str>
impl TryFromSexp for Arc<str>
Source§impl TryFromSexp for BTreeSet<String>
Convert R character vector to BTreeSet<String>.
impl TryFromSexp for BTreeSet<String>
Convert R character vector to BTreeSet<String>.
Source§impl TryFromSexp for BTreeSet<bool>
impl TryFromSexp for BTreeSet<bool>
Source§impl TryFromSexp for BTreeSet<i8>
impl TryFromSexp for BTreeSet<i8>
Source§impl TryFromSexp for BTreeSet<i16>
impl TryFromSexp for BTreeSet<i16>
Source§impl TryFromSexp for BTreeSet<i32>
impl TryFromSexp for BTreeSet<i32>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for BTreeSet<i64>
impl TryFromSexp for BTreeSet<i64>
Source§impl TryFromSexp for BTreeSet<isize>
impl TryFromSexp for BTreeSet<isize>
Source§impl TryFromSexp for BTreeSet<u8>
impl TryFromSexp for BTreeSet<u8>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for BTreeSet<u16>
impl TryFromSexp for BTreeSet<u16>
Source§impl TryFromSexp for BTreeSet<u32>
impl TryFromSexp for BTreeSet<u32>
Source§impl TryFromSexp for BTreeSet<u64>
impl TryFromSexp for BTreeSet<u64>
Source§impl TryFromSexp for BTreeSet<usize>
impl TryFromSexp for BTreeSet<usize>
Source§impl TryFromSexp for Box<str>
impl TryFromSexp for Box<str>
Source§impl TryFromSexp for Cow<'_, str>
Convert an R character scalar to an owned Cow.
impl TryFromSexp for Cow<'_, str>
Convert an R character scalar to an owned Cow.
The same scalar/NA semantics as String. Borrowing requires
super::TryFromRoot, which generated wrappers use for Cow<'_, str>.
Source§impl TryFromSexp for HashSet<RLogical>
impl TryFromSexp for HashSet<RLogical>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for HashSet<String>
Convert R character vector to HashSet<String>.
impl TryFromSexp for HashSet<String>
Convert R character vector to HashSet<String>.
Source§impl TryFromSexp for HashSet<bool>
impl TryFromSexp for HashSet<bool>
Source§impl TryFromSexp for HashSet<i8>
impl TryFromSexp for HashSet<i8>
Source§impl TryFromSexp for HashSet<i16>
impl TryFromSexp for HashSet<i16>
Source§impl TryFromSexp for HashSet<i32>
impl TryFromSexp for HashSet<i32>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for HashSet<i64>
impl TryFromSexp for HashSet<i64>
Source§impl TryFromSexp for HashSet<isize>
impl TryFromSexp for HashSet<isize>
Source§impl TryFromSexp for HashSet<u8>
impl TryFromSexp for HashSet<u8>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for HashSet<u16>
impl TryFromSexp for HashSet<u16>
Source§impl TryFromSexp for HashSet<u32>
impl TryFromSexp for HashSet<u32>
Source§impl TryFromSexp for HashSet<u64>
impl TryFromSexp for HashSet<u64>
Source§impl TryFromSexp for HashSet<usize>
impl TryFromSexp for HashSet<usize>
Source§impl TryFromSexp for Option<&'static str>
impl TryFromSexp for Option<&'static str>
Source§impl TryFromSexp for Option<AsCharacter>
impl TryFromSexp for Option<AsCharacter>
const NATIVE_BORROW: Option<NativeBorrow> = <AsCharacter as crate::from_r::TryFromSexp>::NATIVE_BORROW
const CHARACTER_ONLY: bool = <AsCharacter as crate::from_r::TryFromSexp>::CHARACTER_ONLY
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Option<AsCharacterVec>
impl TryFromSexp for Option<AsCharacterVec>
const NATIVE_BORROW: Option<NativeBorrow> = <AsCharacterVec as crate::from_r::TryFromSexp>::NATIVE_BORROW
const CHARACTER_ONLY: bool = <AsCharacterVec as crate::from_r::TryFromSexp>::CHARACTER_ONLY
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Option<AsNumeric>
impl TryFromSexp for Option<AsNumeric>
const NATIVE_BORROW: Option<NativeBorrow> = <AsNumeric as crate::from_r::TryFromSexp>::NATIVE_BORROW
const CHARACTER_ONLY: bool = <AsNumeric as crate::from_r::TryFromSexp>::CHARACTER_ONLY
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Option<AsNumericVec>
impl TryFromSexp for Option<AsNumericVec>
const NATIVE_BORROW: Option<NativeBorrow> = <AsNumericVec as crate::from_r::TryFromSexp>::NATIVE_BORROW
const CHARACTER_ONLY: bool = <AsNumericVec as crate::from_r::TryFromSexp>::CHARACTER_ONLY
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Option<DataFrame>
NULL → None; any other value converts as a DataFrame (same view,
attributes and NA cells, same error) and becomes Some.
impl TryFromSexp for Option<DataFrame>
NULL → None; any other value converts as a DataFrame (same view,
attributes and NA cells, same error) and becomes Some.
Concrete rather than left to the newtype blanket Option<T> impl
(newtype.rs), which DataFrame does not match: without this impl,
Option<DataFrame>: TryFromSexp fails with E0275 (overflow) instead of
converting.
const NATIVE_BORROW: Option<NativeBorrow> = <DataFrame as TryFromSexp>::NATIVE_BORROW
const CHARACTER_ONLY: bool = <DataFrame as TryFromSexp>::CHARACTER_ONLY
type Error = <DataFrame as TryFromSexp>::Error
fn __mx_has_na(&self) -> bool
fn __mx_input_has_na(&self, input: SEXP) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Option<List>
impl TryFromSexp for Option<List>
Source§impl TryFromSexp for Option<ListMut>
impl TryFromSexp for Option<ListMut>
Source§impl TryFromSexp for Option<NamedList>
impl TryFromSexp for Option<NamedList>
Source§impl TryFromSexp for Option<OsString>
NA-aware OsString conversion: returns None for NA_character_ or NULL.
impl TryFromSexp for Option<OsString>
NA-aware OsString conversion: returns None for NA_character_ or NULL.
Source§impl TryFromSexp for Option<PathBuf>
NA-aware PathBuf conversion: returns None for NA_character_ or NULL.
impl TryFromSexp for Option<PathBuf>
NA-aware PathBuf conversion: returns None for NA_character_ or NULL.
Source§impl TryFromSexp for Option<RLogical>
impl TryFromSexp for Option<RLogical>
Source§impl TryFromSexp for Option<Rboolean>
impl TryFromSexp for Option<Rboolean>
Source§impl TryFromSexp for Option<Rcomplex>
impl TryFromSexp for Option<Rcomplex>
Source§impl TryFromSexp for Option<SEXP>
impl TryFromSexp for Option<SEXP>
Source§impl TryFromSexp for Option<String>
NA-aware string conversion: returns None for NA_character_.
impl TryFromSexp for Option<String>
NA-aware string conversion: returns None for NA_character_.
Use this when you need to distinguish between NA and empty strings:
let maybe_str: Option<String> = sexp.try_into()?;
match maybe_str {
Some(s) => println!("Got string: {}", s),
None => println!("Got NA"),
}Source§impl TryFromSexp for Option<bool>
impl TryFromSexp for Option<bool>
Source§impl TryFromSexp for Option<f32>
impl TryFromSexp for Option<f32>
Source§impl TryFromSexp for Option<f64>
impl TryFromSexp for Option<f64>
Source§impl TryFromSexp for Option<i8>
impl TryFromSexp for Option<i8>
Source§impl TryFromSexp for Option<i16>
impl TryFromSexp for Option<i16>
Source§impl TryFromSexp for Option<i32>
impl TryFromSexp for Option<i32>
Source§impl TryFromSexp for Option<i64>
Convert R numeric scalar to Option<i64>, with NA → None.
impl TryFromSexp for Option<i64>
Convert R numeric scalar to Option<i64>, with NA → None.
Source§impl TryFromSexp for Option<isize>
impl TryFromSexp for Option<isize>
Source§impl TryFromSexp for Option<u8>
impl TryFromSexp for Option<u8>
Source§impl TryFromSexp for Option<u16>
impl TryFromSexp for Option<u16>
Source§impl TryFromSexp for Option<u32>
impl TryFromSexp for Option<u32>
Source§impl TryFromSexp for Option<u64>
impl TryFromSexp for Option<u64>
Source§impl TryFromSexp for Option<usize>
impl TryFromSexp for Option<usize>
Source§impl TryFromSexp for OsString
Convert R character scalar (STRSXP of length 1) to OsString.
impl TryFromSexp for OsString
Convert R character scalar (STRSXP of length 1) to OsString.
Since R strings are converted to UTF-8, the resulting OsString contains
valid UTF-8 data.
§NA Handling
Warning: NA_character_ is converted to empty string. This is lossy!
If you need to distinguish between NA and empty strings, use Option<OsString> instead.
Source§impl TryFromSexp for PathBuf
Convert R character scalar (STRSXP of length 1) to PathBuf.
impl TryFromSexp for PathBuf
Convert R character scalar (STRSXP of length 1) to PathBuf.
§NA Handling
Warning: NA_character_ is converted to empty path "". This is lossy!
If you need to distinguish between NA and empty strings, use Option<PathBuf> instead.
Source§impl TryFromSexp for Rc<str>
impl TryFromSexp for Rc<str>
Source§impl TryFromSexp for String
Convert R character vector (STRSXP) to owned Rust String.
impl TryFromSexp for String
Convert R character vector (STRSXP) to owned Rust String.
Source§impl TryFromSexp for Vec<&'static str>
Convert R character vector to Vec<&str>.
impl TryFromSexp for Vec<&'static str>
Convert R character vector to Vec<&str>.
Warning: NA_character_ values are converted to empty string "".
Source§impl TryFromSexp for Vec<Cow<'_, str>>
Convert a character vector to owned strings; NA becomes an empty string.
Generated wrappers borrow instead through super::TryFromRoot.
impl TryFromSexp for Vec<Cow<'_, str>>
Convert a character vector to owned strings; NA becomes an empty string.
Generated wrappers borrow instead through super::TryFromRoot.
Source§impl TryFromSexp for Vec<List>
A list of lists (a list of R objects, such as model objects), read element
by element (#1837).
impl TryFromSexp for Vec<List>
A list of lists (a list of R objects, such as model objects), read element by element (#1837).
The argument must be a list (VECSXP), and each element a list too. A
pairlist is refused at either level, as for a List argument (#1866).
Every element that fails is reported in one
error, with its position as R counts it: expected list, got numeric (elements 2, 3). The elements stay rooted by the argument list.
A Vec of a #[derive(TryFromSexp)] newtype over List reads through
this, and runs the newtype’s check (#[try_from_sexp(validate = ...)]) on
each element, where each object keeps its class, not on the outer list.
Source§fn __mx_try_from_sexp_with_check(
sexp: SEXP,
check: &ElementCheck<'_>,
) -> Result<Self, SexpError>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
check runs on each element, before the element is read.
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl TryFromSexp for Vec<Logical>
Convert R logical vector (LGLSXP) to Vec<Logical> (ALTREP-compatible).
impl TryFromSexp for Vec<Logical>
Convert R logical vector (LGLSXP) to Vec<Logical> (ALTREP-compatible).
This converts R’s logical vector to a vector of Logical values,
which is the native representation used by ALTREP logical vectors.
Unlike Vec<bool>, this preserves NA values.
Source§impl TryFromSexp for Vec<Option<&'static str>>
Convert R character vector to Vec<Option<&str>>.
impl TryFromSexp for Vec<Option<&'static str>>
Convert R character vector to Vec<Option<&str>>.
Source§impl TryFromSexp for Vec<Option<Cow<'_, str>>>
Convert a character vector to owned strings, preserving NA as None.
Generated wrappers borrow instead through super::TryFromRoot.
impl TryFromSexp for Vec<Option<Cow<'_, str>>>
Convert a character vector to owned strings, preserving NA as None.
Generated wrappers borrow instead through super::TryFromRoot.
Source§impl TryFromSexp for Vec<Option<List>>
A list of lists and NULLs, read element by element: a NULL element is
None, any other element is read as for Vec<List>, with every failing
element reported in one error.
impl TryFromSexp for Vec<Option<List>>
A list of lists and NULLs, read element by element: a NULL element is
None, any other element is read as for Vec<List>, with every failing
element reported in one error.
For a Vec<Option<T>> of a newtype over List, the newtype’s check runs
on each element but NULL, which stays “not given”, as for Option<T>.
Source§fn __mx_try_from_sexp_with_check(
sexp: SEXP,
check: &ElementCheck<'_>,
) -> Result<Self, SexpError>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
check runs on each element but NULL, before the element is read.
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl TryFromSexp for Vec<Option<OsString>>
Convert R character vector (STRSXP) to Vec<Option<OsString>> with NA support.
impl TryFromSexp for Vec<Option<OsString>>
Convert R character vector (STRSXP) to Vec<Option<OsString>> with NA support.
NA_character_ elements are converted to None.
Source§impl TryFromSexp for Vec<Option<PathBuf>>
Convert R character vector (STRSXP) to Vec<Option<PathBuf>> with NA support.
impl TryFromSexp for Vec<Option<PathBuf>>
Convert R character vector (STRSXP) to Vec<Option<PathBuf>> with NA support.
NA_character_ elements are converted to None.
Source§impl TryFromSexp for Vec<Option<RLogical>>
Convert R logical vector (LGLSXP) to Vec<Option<RLogical>> with NA support.
impl TryFromSexp for Vec<Option<RLogical>>
Convert R logical vector (LGLSXP) to Vec<Option<RLogical>> with NA support.
Source§impl TryFromSexp for Vec<Option<Rboolean>>
Convert R logical vector (LGLSXP) to Vec<Option<Rboolean>> with NA support.
impl TryFromSexp for Vec<Option<Rboolean>>
Convert R logical vector (LGLSXP) to Vec<Option<Rboolean>> with NA support.
Source§impl TryFromSexp for Vec<Option<String>>
Convert R character vector (STRSXP) to Vec<Option<String>> with NA support.
impl TryFromSexp for Vec<Option<String>>
Convert R character vector (STRSXP) to Vec<Option<String>> with NA support.
NA_character_ elements are converted to None.
Source§impl TryFromSexp for Vec<Option<bool>>
Convert R logical vector (LGLSXP) to Vec<Option<bool>> with NA support.
impl TryFromSexp for Vec<Option<bool>>
Convert R logical vector (LGLSXP) to Vec<Option<bool>> with NA support.
Source§impl TryFromSexp for Vec<OsString>
Convert R character vector (STRSXP) to Vec<OsString>.
impl TryFromSexp for Vec<OsString>
Convert R character vector (STRSXP) to Vec<OsString>.
§NA Handling
Warning: NA_character_ elements are converted to empty strings.
Use Vec<Option<OsString>> if you need to preserve NA values.
Source§impl TryFromSexp for Vec<PathBuf>
Convert R character vector (STRSXP) to Vec<PathBuf>.
impl TryFromSexp for Vec<PathBuf>
Convert R character vector (STRSXP) to Vec<PathBuf>.
§NA Handling
Warning: NA_character_ elements are converted to empty paths.
Use Vec<Option<PathBuf>> if you need to preserve NA values.
Source§impl TryFromSexp for Vec<RLogical>
impl TryFromSexp for Vec<RLogical>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Vec<Rboolean>
Convert R logical vector (LGLSXP) to Vec<Rboolean> (errors on NA).
impl TryFromSexp for Vec<Rboolean>
Convert R logical vector (LGLSXP) to Vec<Rboolean> (errors on NA).
Source§impl TryFromSexp for Vec<Rcomplex>
impl TryFromSexp for Vec<Rcomplex>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Vec<String>
Convert R character vector to Vec<String>.
impl TryFromSexp for Vec<String>
Convert R character vector to Vec<String>.
§NA and Encoding Handling
Warning: This conversion is lossy for NA values and encoding failures:
NA_character_values are converted to empty string""- Encoding translation failures become empty string
"" - Invalid UTF-8 (after translation) becomes empty string
""
If you need to preserve NA semantics, use Vec<Option<String>> instead:
let strings: Vec<Option<String>> = sexp.try_into()?;
// NA values will be None, valid strings will be Some(s)This design choice prioritizes convenience over strict correctness for the common case where strings are known to be non-NA and properly encoded.
Source§impl TryFromSexp for Vec<bool>
Convert R logical vector (LGLSXP) to Vec<bool> (errors on NA).
impl TryFromSexp for Vec<bool>
Convert R logical vector (LGLSXP) to Vec<bool> (errors on NA).
Source§impl TryFromSexp for Vec<f32>
impl TryFromSexp for Vec<f32>
Source§impl TryFromSexp for Vec<f64>
impl TryFromSexp for Vec<f64>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Vec<i8>
impl TryFromSexp for Vec<i8>
Source§impl TryFromSexp for Vec<i16>
impl TryFromSexp for Vec<i16>
Source§impl TryFromSexp for Vec<i32>
impl TryFromSexp for Vec<i32>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Vec<i64>
impl TryFromSexp for Vec<i64>
Source§impl TryFromSexp for Vec<isize>
impl TryFromSexp for Vec<isize>
Source§impl TryFromSexp for Vec<u8>
impl TryFromSexp for Vec<u8>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl TryFromSexp for Vec<u16>
impl TryFromSexp for Vec<u16>
Source§impl TryFromSexp for Vec<u32>
impl TryFromSexp for Vec<u32>
Source§impl TryFromSexp for Vec<u64>
impl TryFromSexp for Vec<u64>
Source§impl TryFromSexp for Vec<usize>
impl TryFromSexp for Vec<usize>
Source§impl TryFromSexp for bool
impl TryFromSexp for bool
Source§impl TryFromSexp for char
Convert R character vector (STRSXP) to Rust char.
impl TryFromSexp for char
Convert R character vector (STRSXP) to Rust char.
Extracts the first character of the first element of the character vector. Returns an error if the string is empty, NA, or has more than one character.
Source§impl TryFromSexp for f32
impl TryFromSexp for f32
Source§impl TryFromSexp for f64
impl TryFromSexp for f64
Source§impl TryFromSexp for i8
impl TryFromSexp for i8
Source§impl TryFromSexp for i16
impl TryFromSexp for i16
Source§impl TryFromSexp for i32
impl TryFromSexp for i32
Source§impl TryFromSexp for i64
Convert R numeric scalar to i64.
impl TryFromSexp for i64
Convert R numeric scalar to i64.
§Behavior
- Reads from REALSXP (f64) or INTSXP (i32)
- Validates value is a whole number (no fractional part)
- Validates value fits in i64 range
- Returns
Errfor NA values
§Example
// From R integer
let val: i64 = TryFromSexp::try_from_sexp(int_sexp)?;
// From R numeric (must be whole number)
let val: i64 = TryFromSexp::try_from_sexp(real_sexp)?;
// Error: 3.14 is not a whole number
let val: Result<i64, _> = TryFromSexp::try_from_sexp(pi_sexp);Source§impl TryFromSexp for isize
impl TryFromSexp for isize
Source§impl TryFromSexp for u8
impl TryFromSexp for u8
Source§impl TryFromSexp for u16
impl TryFromSexp for u16
Source§impl TryFromSexp for u32
impl TryFromSexp for u32
Source§impl TryFromSexp for u64
Convert R numeric scalar to u64.
impl TryFromSexp for u64
Convert R numeric scalar to u64.
Same behavior as i64(impl TryFromSexp for i64), but also validates
the value is non-negative.
Source§impl TryFromSexp for usize
impl TryFromSexp for usize
Source§impl<'a> TryFromSexp for &'a f64
impl<'a> TryFromSexp for &'a f64
Source§impl<'a> TryFromSexp for &'a i32
impl<'a> TryFromSexp for &'a i32
Source§impl<'a> TryFromSexp for &'a mut f64
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
impl<'a> TryFromSexp for &'a mut f64
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
Source§impl<'a> TryFromSexp for &'a mut i32
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
impl<'a> TryFromSexp for &'a mut i32
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
Source§impl<'a> TryFromSexp for &'a mut u8
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
impl<'a> TryFromSexp for &'a mut u8
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
Source§impl<'a> TryFromSexp for &'a u8
impl<'a> TryFromSexp for &'a u8
Source§impl<'a> TryFromSexp for Option<&'a RLogical>
impl<'a> TryFromSexp for Option<&'a RLogical>
Source§impl<'a> TryFromSexp for Option<&'a Rcomplex>
impl<'a> TryFromSexp for Option<&'a Rcomplex>
Source§impl<'a> TryFromSexp for Option<&'a f64>
impl<'a> TryFromSexp for Option<&'a f64>
Source§impl<'a> TryFromSexp for Option<&'a i32>
impl<'a> TryFromSexp for Option<&'a i32>
Source§impl<'a> TryFromSexp for Option<&'a mut RLogical>
impl<'a> TryFromSexp for Option<&'a mut RLogical>
Source§impl<'a> TryFromSexp for Option<&'a mut Rcomplex>
impl<'a> TryFromSexp for Option<&'a mut Rcomplex>
Source§impl<'a> TryFromSexp for Option<&'a mut f64>
impl<'a> TryFromSexp for Option<&'a mut f64>
Source§impl<'a> TryFromSexp for Option<&'a mut i32>
impl<'a> TryFromSexp for Option<&'a mut i32>
Source§impl<'a> TryFromSexp for Option<&'a mut u8>
impl<'a> TryFromSexp for Option<&'a mut u8>
Source§impl<'a> TryFromSexp for Option<&'a u8>
impl<'a> TryFromSexp for Option<&'a u8>
Source§impl<'a> TryFromSexp for Vec<&'a RLogical>
impl<'a> TryFromSexp for Vec<&'a RLogical>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a Rcomplex>
impl<'a> TryFromSexp for Vec<&'a Rcomplex>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a [RLogical]>
impl<'a> TryFromSexp for Vec<&'a [RLogical]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a [Rcomplex]>
impl<'a> TryFromSexp for Vec<&'a [Rcomplex]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a [f64]>
impl<'a> TryFromSexp for Vec<&'a [f64]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a [i32]>
impl<'a> TryFromSexp for Vec<&'a [i32]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a [u8]>
impl<'a> TryFromSexp for Vec<&'a [u8]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a f64>
impl<'a> TryFromSexp for Vec<&'a f64>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a i32>
impl<'a> TryFromSexp for Vec<&'a i32>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut RLogical>
impl<'a> TryFromSexp for Vec<&'a mut RLogical>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut Rcomplex>
impl<'a> TryFromSexp for Vec<&'a mut Rcomplex>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut [RLogical]>
impl<'a> TryFromSexp for Vec<&'a mut [RLogical]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut [Rcomplex]>
impl<'a> TryFromSexp for Vec<&'a mut [Rcomplex]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut [f64]>
impl<'a> TryFromSexp for Vec<&'a mut [f64]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut [i32]>
impl<'a> TryFromSexp for Vec<&'a mut [i32]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut [u8]>
impl<'a> TryFromSexp for Vec<&'a mut [u8]>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut f64>
impl<'a> TryFromSexp for Vec<&'a mut f64>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut i32>
impl<'a> TryFromSexp for Vec<&'a mut i32>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a mut u8>
impl<'a> TryFromSexp for Vec<&'a mut u8>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<&'a u8>
impl<'a> TryFromSexp for Vec<&'a u8>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a RLogical>>
impl<'a> TryFromSexp for Vec<Option<&'a RLogical>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a Rcomplex>>
impl<'a> TryFromSexp for Vec<Option<&'a Rcomplex>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a [RLogical]>>
impl<'a> TryFromSexp for Vec<Option<&'a [RLogical]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a [Rcomplex]>>
impl<'a> TryFromSexp for Vec<Option<&'a [Rcomplex]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a [f64]>>
impl<'a> TryFromSexp for Vec<Option<&'a [f64]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a [i32]>>
impl<'a> TryFromSexp for Vec<Option<&'a [i32]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a [u8]>>
impl<'a> TryFromSexp for Vec<Option<&'a [u8]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a f64>>
impl<'a> TryFromSexp for Vec<Option<&'a f64>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a i32>>
impl<'a> TryFromSexp for Vec<Option<&'a i32>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut RLogical>>
impl<'a> TryFromSexp for Vec<Option<&'a mut RLogical>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut Rcomplex>>
impl<'a> TryFromSexp for Vec<Option<&'a mut Rcomplex>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut [RLogical]>>
impl<'a> TryFromSexp for Vec<Option<&'a mut [RLogical]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut [Rcomplex]>>
impl<'a> TryFromSexp for Vec<Option<&'a mut [Rcomplex]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut [f64]>>
impl<'a> TryFromSexp for Vec<Option<&'a mut [f64]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut [i32]>>
impl<'a> TryFromSexp for Vec<Option<&'a mut [i32]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut [u8]>>
impl<'a> TryFromSexp for Vec<Option<&'a mut [u8]>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut f64>>
impl<'a> TryFromSexp for Vec<Option<&'a mut f64>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut i32>>
impl<'a> TryFromSexp for Vec<Option<&'a mut i32>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a mut u8>>
impl<'a> TryFromSexp for Vec<Option<&'a mut u8>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<'a> TryFromSexp for Vec<Option<&'a u8>>
impl<'a> TryFromSexp for Vec<Option<&'a u8>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp, L: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H, I, J, K, L)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
<I as TryFromSexp>::Error: Into<SexpError>,
<J as TryFromSexp>::Error: Into<SexpError>,
<K as TryFromSexp>::Error: Into<SexpError>,
<L as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp, L: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H, I, J, K, L)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
<I as TryFromSexp>::Error: Into<SexpError>,
<J as TryFromSexp>::Error: Into<SexpError>,
<K as TryFromSexp>::Error: Into<SexpError>,
<L as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp, L: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H, I, J, K, L)>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
L::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp, L: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H, I, J, K, L)>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
L::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C, D, E, F, G, H, I, J, K, L)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp, L: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H, I, J, K, L)>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
L::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp, L: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H, I, J, K, L)>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
L::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp, L: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H, I, J, K, L)>>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
L::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp, L: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H, I, J, K, L)>>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
L::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H, I, J, K)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
<I as TryFromSexp>::Error: Into<SexpError>,
<J as TryFromSexp>::Error: Into<SexpError>,
<K as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H, I, J, K)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
<I as TryFromSexp>::Error: Into<SexpError>,
<J as TryFromSexp>::Error: Into<SexpError>,
<K as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H, I, J, K)>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H, I, J, K)>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C, D, E, F, G, H, I, J, K)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H, I, J, K)>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H, I, J, K)>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H, I, J, K)>>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp, K: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H, I, J, K)>>where
A::Error: Into<SexpError>,
B::Error: Into<SexpError>,
C::Error: Into<SexpError>,
D::Error: Into<SexpError>,
E::Error: Into<SexpError>,
F::Error: Into<SexpError>,
G::Error: Into<SexpError>,
H::Error: Into<SexpError>,
I::Error: Into<SexpError>,
J::Error: Into<SexpError>,
K::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H, I, J)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
<I as TryFromSexp>::Error: Into<SexpError>,
<J as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H, I, J)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
<I as TryFromSexp>::Error: Into<SexpError>,
<J as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H, I, J)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H, I, J)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C, D, E, F, G, H, I, J)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H, I, J)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H, I, J)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H, I, J)>>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp, J: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H, I, J)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H, I)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
<I as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H, I)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
<I as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H, I)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H, I)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C, D, E, F, G, H, I)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H, I)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H, I)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H, I)>>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp, I: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H, I)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G, H)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
<H as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G, H)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C, D, E, F, G, H)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G, H)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H)>>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp, H: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G, H)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp> TryFromSexp for (A, B, C, D, E, F, G)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
<G as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F, G)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C, D, E, F, G)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F, G)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G)>>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp, G: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F, G)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp> TryFromSexp for (A, B, C, D, E, F)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp> TryFromSexp for (A, B, C, D, E, F)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
<F as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E, F)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C, D, E, F)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E, F)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F)>>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp, F: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E, F)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp> TryFromSexp for (A, B, C, D, E)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp> TryFromSexp for (A, B, C, D, E)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
<E as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp> TryFromSexp for Option<(A, B, C, D, E)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C, D, E)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp> TryFromSexp for Vec<(A, B, C, D, E)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E)>>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp, E: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D, E)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp> TryFromSexp for (A, B, C, D)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp> TryFromSexp for (A, B, C, D)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
<D as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp> TryFromSexp for Option<(A, B, C, D)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp> TryFromSexp for Option<(A, B, C, D)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C, D)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp> TryFromSexp for Vec<(A, B, C, D)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp> TryFromSexp for Vec<(A, B, C, D)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D)>>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp, D: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C, D)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp> TryFromSexp for (A, B, C)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp> TryFromSexp for (A, B, C)where
<A as TryFromSexp>::Error: Into<SexpError>,
<B as TryFromSexp>::Error: Into<SexpError>,
<C as TryFromSexp>::Error: Into<SexpError>,
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp> TryFromSexp for Option<(A, B, C)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp> TryFromSexp for Option<(A, B, C)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B, C)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp> TryFromSexp for Vec<(A, B, C)>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp> TryFromSexp for Vec<(A, B, C)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C)>>
impl<A: TryFromSexp, B: TryFromSexp, C: TryFromSexp> TryFromSexp for Vec<Option<(A, B, C)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp> TryFromSexp for (A, B)
impl<A: TryFromSexp, B: TryFromSexp> TryFromSexp for (A, B)
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp> TryFromSexp for Option<(A, B)>
impl<A: TryFromSexp, B: TryFromSexp> TryFromSexp for Option<(A, B)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A, B)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp, B: TryFromSexp> TryFromSexp for Vec<(A, B)>
impl<A: TryFromSexp, B: TryFromSexp> TryFromSexp for Vec<(A, B)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp, B: TryFromSexp> TryFromSexp for Vec<Option<(A, B)>>
impl<A: TryFromSexp, B: TryFromSexp> TryFromSexp for Vec<Option<(A, B)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp> TryFromSexp for (A,)
impl<A: TryFromSexp> TryFromSexp for (A,)
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp> TryFromSexp for Option<(A,)>
impl<A: TryFromSexp> TryFromSexp for Option<(A,)>
const NATIVE_BORROW: Option<NativeBorrow> = <(A,)>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<A: TryFromSexp> TryFromSexp for Vec<(A,)>
impl<A: TryFromSexp> TryFromSexp for Vec<(A,)>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<A: TryFromSexp> TryFromSexp for Vec<Option<(A,)>>
impl<A: TryFromSexp> TryFromSexp for Vec<Option<(A,)>>
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<T, const N: usize> TryFromSexp for [T; N]where
T: RNativeType + Copy,
Blanket impl: Convert R vector to [T; N] where T: RNativeType.
impl<T, const N: usize> TryFromSexp for [T; N]where
T: RNativeType + Copy,
Blanket impl: Convert R vector to [T; N] where T: RNativeType.
Returns an error if the R vector length doesn’t match N. Useful for SHA hashes ([u8; 32]), fixed-size patterns, etc.
Source§impl<T: ParseRStr> TryFromSexp for Option<ParsedRStr<T>>
NA_character_ / NULL → None; a parse failure as for the scalar.
impl<T: ParseRStr> TryFromSexp for Option<ParsedRStr<T>>
NA_character_ / NULL → None; a parse failure as for the scalar.
Source§impl<T: ParseRStr> TryFromSexp for Vec<Option<ParsedRStr<T>>>
NA elements → None; parse failures batch as for Vec<T>.
impl<T: ParseRStr> TryFromSexp for Vec<Option<ParsedRStr<T>>>
NA elements → None; parse failures batch as for Vec<T>.
Source§impl<T: ParseRStr> TryFromSexp for Vec<ParsedRStr<T>>
NA elements and parse failures are collected across the whole vector
into one batched InvalidValue, each reason followed by the
1-based positions that failed with it:
NA is not allowed (element 2); invalid <label>: <error> (elements 3, 5).
impl<T: ParseRStr> TryFromSexp for Vec<ParsedRStr<T>>
NA elements and parse failures are collected across the whole vector
into one batched InvalidValue, each reason followed by the
1-based positions that failed with it:
NA is not allowed (element 2); invalid <label>: <error> (elements 3, 5).
Source§impl<T: RNativeType> TryFromSexp for Cow<'_, [T]>
Convert an R native vector to an owned Cow.
impl<T: RNativeType> TryFromSexp for Cow<'_, [T]>
Convert an R native vector to an owned Cow.
A raw SEXP carries no borrow lifetime. Use super::TryFromRoot to borrow
without copying; generated wrappers select that path for Cow<'_, [T]>.
Source§impl<T: TryFromSexpElement + TryFromSexp> TryFromSexp for Option<T>where
T::Inner: OptionInner,
impl<T: TryFromSexpElement + TryFromSexp> TryFromSexp for Option<T>where
T::Inner: OptionInner,
const NATIVE_BORROW: Option<NativeBorrow> = <T::Inner as OptionInner>::OPTION_NATIVE_BORROW
const CHARACTER_ONLY: bool = <T::Inner as OptionInner>::OPTION_CHARACTER_ONLY
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<T: TryFromSexpElement> TryFromSexp for Vec<Option<T>>where
T::Inner: VecOptionInner,
impl<T: TryFromSexpElement> TryFromSexp for Vec<Option<T>>where
T::Inner: VecOptionInner,
const NATIVE_BORROW: Option<NativeBorrow> = <T::Inner as VecOptionInner>::VEC_OPTION_NATIVE_BORROW
const CHARACTER_ONLY: bool = <T::Inner as VecOptionInner>::VEC_OPTION_CHARACTER_ONLY
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<T: TryFromSexpElement> TryFromSexp for Vec<T>
impl<T: TryFromSexpElement> TryFromSexp for Vec<T>
const NATIVE_BORROW: Option<NativeBorrow> = <T::Inner as VecInner>::VEC_NATIVE_BORROW
const CHARACTER_ONLY: bool = <T::Inner as VecInner>::VEC_CHARACTER_ONLY
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
fn __mx_try_from_sexp_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
unsafe fn __mx_try_from_sexp_unchecked_with_check( sexp: SEXP, check: &ElementCheck<'_>, ) -> Result<Self, SexpError>
Source§impl<T: TypedExternal + Send> TryFromSexp for Option<ExternalPtr<T>>
impl<T: TypedExternal + Send> TryFromSexp for Option<ExternalPtr<T>>
Source§impl<T: TypedExternal + Send> TryFromSexp for Vec<ExternalPtr<T>>
Convert an R list (VECSXP) of external pointers to Vec<ExternalPtr<T>>.
impl<T: TypedExternal + Send> TryFromSexp for Vec<ExternalPtr<T>>
Convert an R list (VECSXP) of external pointers to Vec<ExternalPtr<T>>.
Each element must be an EXTPTRSXP carrying a T; conversion delegates to
ExternalPtr::<T>::try_from_sexp per element. This lets #[miniextendr]
functions accept an R list() of opaque handles (issue #827). A user crate
can’t write this impl itself — the orphan rule rejects
impl TryFromSexp for Vec<ExternalPtr<T>> there because both Vec and
TryFromSexp are foreign — so it lives here, keyed on ExternalPtr<T> to
avoid colliding with the atomic-vector impls.
Source§impl<T: TypedExternal + Send> TryFromSexp for Vec<Option<ExternalPtr<T>>>
Convert an R list (VECSXP) of external pointers / NULLs to
Vec<Option<ExternalPtr<T>>>. NULL elements map to None; every other
element must be an EXTPTRSXP carrying a T (issue #827).
impl<T: TypedExternal + Send> TryFromSexp for Vec<Option<ExternalPtr<T>>>
Convert an R list (VECSXP) of external pointers / NULLs to
Vec<Option<ExternalPtr<T>>>. NULL elements map to None; every other
element must be an EXTPTRSXP carrying a T (issue #827).
Source§impl<T> TryFromSexp for &[T]where
T: RNativeType + Copy,
Blanket impl for &[T] where T: RNativeType
impl<T> TryFromSexp for &[T]where
T: RNativeType + Copy,
Blanket impl for &[T] where T: RNativeType
This replaces the macro-generated &'static [T] impls with a more composable
blanket impl that works for any lifetime. This enables containers like TinyVec
to use blanket impls without needing helper functions.
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<T> TryFromSexp for &mut [T]where
T: RNativeType + Copy,
Blanket impl for &mut [T] where T: RNativeType
impl<T> TryFromSexp for &mut [T]where
T: RNativeType + Copy,
Blanket impl for &mut [T] where T: RNativeType
§Safety note (aliasing)
This impl hands out a &mut view over R’s data pointer without copying, so
binding the same R vector to two slice parameters aliases one buffer. That is
undefined behavior whenever at least one borrow is mutable — two &mut [T],
or a &mut [T] paired with a shared &[T] (which borrows the same buffer).
Generated wrappers reject repeated non-empty R vector identities before
conversion in every build, including scalar/slice pairs and borrowed leaves
inside optional, nested, and boxed containers (#1104, #1252, #1502). Direct callers of this conversion must ensure the
resulting borrow does not overlap another live mutable or shared borrow.
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpTypeError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<T> TryFromSexp for BinaryHeap<T>
Blanket impl: Convert R vector to BinaryHeap<T> where T: RNativeType + Ord.
impl<T> TryFromSexp for BinaryHeap<T>
Blanket impl: Convert R vector to BinaryHeap<T> where T: RNativeType + Ord.
Creates a binary heap from the R vector elements.
Source§impl<T> TryFromSexp for Box<[T]>where
Vec<T>: TryFromSexp,
impl<T> TryFromSexp for Box<[T]>where
Vec<T>: TryFromSexp,
const NATIVE_BORROW: Option<NativeBorrow> = <Vec<T> as TryFromSexp>::NATIVE_BORROW
const CHARACTER_ONLY: bool = <Vec<T> as TryFromSexp>::CHARACTER_ONLY
type Error = <Vec<T> as TryFromSexp>::Error
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<T> TryFromSexp for Option<&[T]>where
T: RNativeType + Copy,
Blanket impl for Option<&[T]> where T: RNativeType
impl<T> TryFromSexp for Option<&[T]>where
T: RNativeType + Copy,
Blanket impl for Option<&[T]> where T: RNativeType
Source§impl<T> TryFromSexp for Option<&mut [T]>where
T: RNativeType + Copy,
Blanket impl for Option<&mut [T]> where T: RNativeType
impl<T> TryFromSexp for Option<&mut [T]>where
T: RNativeType + Copy,
Blanket impl for Option<&mut [T]> where T: RNativeType
Source§impl<T> TryFromSexp for Option<BTreeSet<T>>
Convert R value to Option<BTreeSet<T>>: NULL -> None, otherwise Some(set).
impl<T> TryFromSexp for Option<BTreeSet<T>>
Convert R value to Option<BTreeSet<T>>: NULL -> None, otherwise Some(set).
Source§impl<T> TryFromSexp for Option<HashSet<T>>
Convert R value to Option<HashSet<T>>: NULL -> None, otherwise Some(set).
impl<T> TryFromSexp for Option<HashSet<T>>
Convert R value to Option<HashSet<T>>: NULL -> None, otherwise Some(set).
Source§impl<T> TryFromSexp for Option<Vec<T>>
Convert R value to Option<Vec<T>>: NULL → None, otherwise Some(vec).
impl<T> TryFromSexp for Option<Vec<T>>
Convert R value to Option<Vec<T>>: NULL → None, otherwise Some(vec).
const NATIVE_BORROW: Option<NativeBorrow> = <Vec<T> as TryFromSexp>::NATIVE_BORROW
const CHARACTER_ONLY: bool = <Vec<T> as TryFromSexp>::CHARACTER_ONLY
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<T> TryFromSexp for Result<T, ()>
impl<T> TryFromSexp for Result<T, ()>
const NATIVE_BORROW: Option<NativeBorrow> = T::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn __mx_input_has_na(&self, input: SEXP) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
unsafe fn try_from_sexp_unchecked(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<T> TryFromSexp for Vec<Vec<T>>
Convert R list (VECSXP) to Vec<Vec<T>>.
impl<T> TryFromSexp for Vec<Vec<T>>
Convert R list (VECSXP) to Vec<Vec<T>>.
Each element of the R list must be convertible to Vec<T>.
Source§impl<T> TryFromSexp for VecDeque<T>where
T: RNativeType + Copy,
Blanket impl: Convert R vector to VecDeque<T> where T: RNativeType.
impl<T> TryFromSexp for VecDeque<T>where
T: RNativeType + Copy,
Blanket impl: Convert R vector to VecDeque<T> where T: RNativeType.
Source§impl<V: TryFromSexp> TryFromSexp for BTreeMap<String, V>
Convert R named list (VECSXP) to BTreeMap<String, V>.
impl<V: TryFromSexp> TryFromSexp for BTreeMap<String, V>
Convert R named list (VECSXP) to BTreeMap<String, V>.
See named_list_to_map for NA/empty name handling (elements with NA/empty
names map to key "" and may silently overwrite each other).
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<V: TryFromSexp> TryFromSexp for HashMap<String, V>
Convert R named list (VECSXP) to HashMap<String, V>.
impl<V: TryFromSexp> TryFromSexp for HashMap<String, V>
Convert R named list (VECSXP) to HashMap<String, V>.
See named_list_to_map for NA/empty name handling (elements with NA/empty
names map to key "" and may silently overwrite each other).
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<V: TryFromSexp> TryFromSexp for Option<BTreeMap<String, V>>
Convert R value to Option<BTreeMap<String, V>>: NULL -> None, otherwise Some(map).
impl<V: TryFromSexp> TryFromSexp for Option<BTreeMap<String, V>>
Convert R value to Option<BTreeMap<String, V>>: NULL -> None, otherwise Some(map).
const NATIVE_BORROW: Option<NativeBorrow> = <BTreeMap<String, V> as TryFromSexp>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<V: TryFromSexp> TryFromSexp for Option<HashMap<String, V>>
Convert R value to Option<HashMap<String, V>>: NULL -> None, otherwise Some(map).
impl<V: TryFromSexp> TryFromSexp for Option<HashMap<String, V>>
Convert R value to Option<HashMap<String, V>>: NULL -> None, otherwise Some(map).
const NATIVE_BORROW: Option<NativeBorrow> = <HashMap<String, V> as TryFromSexp>::NATIVE_BORROW
type Error = SexpError
fn __mx_has_na(&self) -> bool
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<V: TryFromSexp> TryFromSexp for Vec<BTreeMap<String, V>>
Convert R list of named lists to Vec<BTreeMap<String, V>>.
impl<V: TryFromSexp> TryFromSexp for Vec<BTreeMap<String, V>>
Convert R list of named lists to Vec<BTreeMap<String, V>>.
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Source§impl<V: TryFromSexp> TryFromSexp for Vec<HashMap<String, V>>
Convert R list of named lists to Vec<HashMap<String, V>>.
impl<V: TryFromSexp> TryFromSexp for Vec<HashMap<String, V>>
Convert R list of named lists to Vec<HashMap<String, V>>.
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
fn try_from_sexp(sexp: SEXP) -> Result<Self, Self::Error>
Implementors§
Source§impl TryFromSexp for AltrepSexp
Conversion from R SEXP to AltrepSexp.
impl TryFromSexp for AltrepSexp
Conversion from R SEXP to AltrepSexp.
Only succeeds if the input is an ALTREP vector (ALTREP(sexp) != 0).
Non-ALTREP input produces SexpError::InvalidValue.
This is the inverse of TryFromSexp for SEXP,
which accepts any SEXP but auto-materializes ALTREP.
Source§impl TryFromSexp for AsCharacter
impl TryFromSexp for AsCharacter
Source§impl TryFromSexp for AsCharacterVec
impl TryFromSexp for AsCharacterVec
Source§impl TryFromSexp for AsNumericVec
impl TryFromSexp for AsNumericVec
Source§impl TryFromSexp for List
A List reads any R list, whatever its names.
impl TryFromSexp for List
A List reads any R list, whatever its names.
Accepts a VECSXP only; anything else is a SexpTypeError. A pairlist
(LISTSXP, such as formals(f) or pairlist(...)) is refused, not
coerced (#1866): the coerced copy would be a new object that nothing
roots, since List is a Copy view, so the first allocation in the
function could free it. The caller converts with as.list(), and the
argument error says so.
Names are not checked: R allows a name to appear more than once
(list(a = 1, a = 2)), and so does List. A function that needs unique
names checks with List::first_duplicate_name.
type Error = SexpTypeError
Source§impl TryFromSexp for NArgs
The integer scalar nargs() returns, as a non-negative count.
impl TryFromSexp for NArgs
The integer scalar nargs() returns, as a non-negative count.
Source§impl TryFromSexp for ProtectedStrVec
impl TryFromSexp for ProtectedStrVec
Source§impl TryFromSexp for SEXP
Pass-through conversion for raw SEXP values with ALTREP auto-materialization.
impl TryFromSexp for SEXP
Pass-through conversion for raw SEXP values with ALTREP auto-materialization.
This allows SEXP to be used directly in #[miniextendr] function signatures.
When R passes an ALTREP vector (e.g., 1:10, seq_len(N)),
ensure_materialized is called
automatically to force materialization on the R main thread. After this,
the SEXP’s data pointer is stable and safe to access from any thread.
§ALTREP handling
| Input | Result |
|---|---|
| Regular SEXP | Passed through unchanged |
| ALTREP SEXP | Materialized via ensure_materialized, then passed through |
To receive ALTREP without materializing, use
AltrepSexp as the parameter type instead.
To receive the raw SEXP without any conversion (including no materialization),
use extern "C-unwind".
§Safety
SEXP handles are only valid on R’s main thread. Standalone #[miniextendr]
functions taking a SEXP parameter run on the main thread automatically.
Source§impl<'a> TryFromSexp for &'a RLogical
impl<'a> TryFromSexp for &'a RLogical
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
Source§impl<'a> TryFromSexp for &'a Rcomplex
impl<'a> TryFromSexp for &'a Rcomplex
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
Source§impl<'a> TryFromSexp for &'a mut RLogical
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
impl<'a> TryFromSexp for &'a mut RLogical
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
Source§impl<'a> TryFromSexp for &'a mut Rcomplex
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
impl<'a> TryFromSexp for &'a mut Rcomplex
§Safety note (aliasing)
This impl can produce aliased &mut references if the same R object
is passed to multiple mutable parameters. The caller (generated wrapper)
rejects overlapping native mutable/shared borrows before conversion.
Direct conversion callers must enforce this borrowing contract themselves.
const NATIVE_BORROW: Option<NativeBorrow>
type Error = SexpError
Source§impl<'a> TryFromSexp for Factor<'a>
impl<'a> TryFromSexp for Factor<'a>
Source§impl<T, R> TryFromSexp for Coerced<T, R>where
R: TryFromSexp + TryCoerce<T>,
<R as TryFromSexp>::Error: Into<SexpError>,
<R as TryCoerce<T>>::Error: Display,
Convert R value to Coerced<T, R> by reading R and coercing to T.
impl<T, R> TryFromSexp for Coerced<T, R>where
R: TryFromSexp + TryCoerce<T>,
<R as TryFromSexp>::Error: Into<SexpError>,
<R as TryCoerce<T>>::Error: Display,
Convert R value to Coerced<T, R> by reading R and coercing to T.
This enables reading non-native Rust types from R with coercion:
// Read i64 from R integer (i32)
let val: Coerced<i64, i32> = TryFromSexp::try_from_sexp(sexp)?;
let i64_val: i64 = val.into_inner();
// Works with collections too:
let vec: Vec<Coerced<i64, i32>> = ...;
let set: HashSet<Coerced<NonZeroU32, i32>> = ...;Source§impl<T: FromStr> TryFromSexp for AsFromStr<T>
impl<T: FromStr> TryFromSexp for AsFromStr<T>
Source§impl<T: FromStr> TryFromSexp for AsFromStrVec<T>
impl<T: FromStr> TryFromSexp for AsFromStrVec<T>
Source§impl<T: ParseRStr> TryFromSexp for ParsedRStr<T>
NA_character_ / NULL → SexpError::Na; a parse failure →
InvalidValue("invalid <label>: <error>").
impl<T: ParseRStr> TryFromSexp for ParsedRStr<T>
NA_character_ / NULL → SexpError::Na; a parse failure →
InvalidValue("invalid <label>: <error>").
Source§impl<T: RFactor> TryFromSexp for FactorOptionVec<T>
impl<T: RFactor> TryFromSexp for FactorOptionVec<T>
Source§impl<T: RNativeType, const NDIM: usize> TryFromSexp for RArray<T, NDIM>
impl<T: RNativeType, const NDIM: usize> TryFromSexp for RArray<T, NDIM>
Source§impl<T: TypedExternal + Send> TryFromSexp for ExternalPtr<T>
Convert R EXTPTRSXP to ExternalPtr<T>.
impl<T: TypedExternal + Send> TryFromSexp for ExternalPtr<T>
Convert R EXTPTRSXP to ExternalPtr<T>.
This enables using ExternalPtr<T> as parameter types in #[miniextendr]
functions, for a body that keeps or consumes the handle; a body that only
reads the value takes &T.
§Example
#[derive(ExternalPtr)]
struct MyData { value: i32 }
#[miniextendr]
fn process(data: ExternalPtr<MyData>) -> i32 {
data.borrow().value
}