pub struct FailedElements {
message: String,
class: Vec<String>,
elements: Vec<FailedElement>,
}Expand description
The elements of a container whose conversion to R failed (a tuple’s
fields, the rows of a Vec of tuples, the elements of an AsJsonVec):
the batched message, the class
they share and each failing element’s own condition with its position.
Raised in R (kind = "result_err"):
- the message names every failing position, in the grammar of every
batched conversion:
map keys must be strings for R named lists (element 2); - the class vector is the one every failing element has, when they all
have the same, so a handler for the element’s class catches the
container as it catches the element alone; when they differ (or have
none) the error has only the
rust_errorclasses; e$errorsis a list with one entry per failing element,list(index = , condition = ):indexis its position, numbered as R counts (2Lfor a tuple’s second field,c(3L, 2L)for the second field of aVecof tuples’ third row), andconditionthe condition the element raises as a return value of its own, with its classes, message and fields.
e$errors lists every failure. Only the message stops at the first ten,
ending ; and N more. The shared class is decided over every failure.
Fields§
§message: String§class: Vec<String>§elements: Vec<FailedElement>Implementations§
Source§impl FailedElements
impl FailedElements
Sourcepub fn class(&self) -> &[String]
pub fn class(&self) -> &[String]
The classes every failing element shares; empty when they differ.
Sourcepub fn elements(&self) -> &[FailedElement]
pub fn elements(&self) -> &[FailedElement]
The listed failing elements, in the order they failed.
Sourcefn errors_rvalue(&self) -> RValue
fn errors_rvalue(&self) -> RValue
e$errors as the tagged values the R raise helper builds into
list(index = , condition = ) entries.
Trait Implementations§
Source§impl Clone for FailedElements
impl Clone for FailedElements
Auto Trait Implementations§
impl Forget for FailedElements
impl Freeze for FailedElements
impl RefUnwindSafe for FailedElements
impl Send for FailedElements
impl Sync for FailedElements
impl Unpin for FailedElements
impl UnsafeUnpin for FailedElements
impl UnwindSafe for FailedElements
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<T> RDebug for Twhere
T: Debug,
impl<T> RDebug for Twhere
T: Debug,
Source§impl<T> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
core_io_internals)[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read moreSource§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize
#[doc(hidden)]const SIZE: usize
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize
#[doc(hidden)]const ALIGN: usize
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment
#[doc(hidden)]const ALIGNMENT: Alignment
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool
#[doc(hidden)]const IS_ZST: bool
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout
#[doc(hidden)]const LAYOUT: Layout
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize
#[doc(hidden)]const MAX_SLICE_LEN: usize
sized_type_properties)[Self]. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 72 bytes