pub enum IntoRError {
StringTooLong {
len: usize,
},
LengthOverflow {
len: usize,
},
Elements(FailedElements),
}Expand description
Error returned by IntoR::try_into_sexp
for types whose conversion to R can fail.
§Variants
StringTooLong: a Rust string exceeds R’si32length limit (~2 GB)LengthOverflow: a collection length exceeds R’sR_xlen_tcapacityElements: elements of a container failed to convert (a tuple’s fields, the rows of aVecof tuples), each with its own condition
It implements RConditionData. Returned from a #[miniextendr]
function, an Elements error raises the batched message, the class every
failing element shares (else none beyond rust_error) and e$errors,
one entry per failing element: see FailedElements.
Variants§
StringTooLong
A string’s byte length exceeds i32::MAX.
LengthOverflow
A collection’s element count exceeds the target R vector capacity.
Elements(FailedElements)
Elements of a container failed to convert.
Trait Implementations§
Source§impl Clone for IntoRError
impl Clone for IntoRError
Source§impl Debug for IntoRError
impl Debug for IntoRError
Source§impl Display for IntoRError
impl Display for IntoRError
Source§impl Error for IntoRError
impl Error for IntoRError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Source§#[doc(hidden)]fn type_id(&self, _: Internal) -> TypeIdwhere
Self: 'static,
#[doc(hidden)]fn type_id(&self, _: Internal) -> TypeIdwhere
Self: 'static,
error_type_id)TypeId of self.1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl RConditionData for IntoRError
The condition an IntoRError raises in R: its message; for Elements
the shared class of the failing elements and their conditions as
e$errors.
impl RConditionData for IntoRError
The condition an IntoRError raises in R: its message; for Elements
the shared class of the failing elements and their conditions as
e$errors.
Source§fn __mx_keeps_internal_fields(&self) -> bool
fn __mx_keeps_internal_fields(&self) -> bool
The .mx_errors field of Elements is the framework’s own.
Source§fn data(&self) -> Option<ConditionData>
fn data(&self) -> Option<ConditionData>
e$<name>).Source§fn call(&self) -> ConditionCall
fn call(&self) -> ConditionCall
ConditionCall::None makes
conditionCall() NULL, like R’s call. = FALSE, for a condition
about the data rather than the call; the default keeps the call the
transport captured. Honoured by defer_* and by Result returns;
an argument-conversion error always keeps the call (see
conversion_err_parts). #[condition(call = none)] on a derived
type or variant overrides this.Auto Trait Implementations§
impl Forget for IntoRError
impl Freeze for IntoRError
impl RefUnwindSafe for IntoRError
impl Send for IntoRError
impl Sync for IntoRError
impl Unpin for IntoRError
impl UnsafeUnpin for IntoRError
impl UnwindSafe for IntoRError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConsumingFallible for Twhere
T: Clone,
Source§impl<E> ConversionArgMessageClassed for Ewhere
E: RConditionData,
impl<E> ConversionArgMessageClassed for Ewhere
E: RConditionData,
Source§impl<E> ConversionErrClassed for Ewhere
E: RConditionData,
impl<E> ConversionErrClassed for Ewhere
E: RConditionData,
fn __mx_conversion_parts(&self, _expected_known: bool) -> ErrParts
Source§impl<E> ErrPartsClassed for Ewhere
E: RConditionData,
impl<E> ErrPartsClassed for Ewhere
E: RConditionData,
fn __mx_classed_parts(&self) -> Option<ErrParts>
Source§impl<T> RDebug for Twhere
T: Debug,
impl<T> RDebug for Twhere
T: Debug,
Source§impl<T> RError for Twhere
T: Error,
impl<T> RError for Twhere
T: Error,
Source§fn error_message(&self) -> String
fn error_message(&self) -> String
Source§fn error_chain(&self) -> Vec<String>
fn error_chain(&self) -> Vec<String>
Source§fn error_chain_length(&self) -> i32
fn error_chain_length(&self) -> i32
Source§#[doc(hidden)]unsafe extern "C" fn __RError_error_message_shim(
data: *mut c_void,
argc: i32,
argv: *const SEXP,
) -> SEXP
#[doc(hidden)]unsafe extern "C" fn __RError_error_message_shim(
data: *mut c_void,
argc: i32,
argv: *const SEXP,
) -> SEXP
RError::error_message. Read moreSource§impl<T> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
core_io_internals)[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize
#[doc(hidden)]const SIZE: usize
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize
#[doc(hidden)]const ALIGN: usize
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment
#[doc(hidden)]const ALIGNMENT: Alignment
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool
#[doc(hidden)]const IS_ZST: bool
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout
#[doc(hidden)]const LAYOUT: Layout
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize
#[doc(hidden)]const MAX_SLICE_LEN: usize
sized_type_properties)[Self]. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes
Size for each variant:
StringTooLong: 16 bytesLengthOverflow: 16 bytesElements: 72 bytes