pub enum DataFrameError {
Show 17 variants
NotList(SEXPTYPE),
NotDataFrame,
NoNames,
BadRowNames(String),
UnequalLengths {
expected: usize,
columns: Vec<(String, usize)>,
},
UnnamedColumns,
NoSuchColumn(String),
EmptyGroupColumns,
UnsupportedGroupColumn {
column: String,
type_of: String,
},
NotGroupedDataFrame,
GroupsNotDataFrame,
MissingGroupRows,
BadGroupRows {
group: Option<usize>,
type_of: String,
},
GroupIndexOutOfRange {
group: usize,
value: i64,
nrow: usize,
},
GroupRowUncovered {
row: usize,
nrow: usize,
},
GroupRowDuplicated {
row: usize,
first_group: usize,
second_group: usize,
},
Conversion(String),
}Expand description
Error returned by any DataFrame construction, read, or conversion path.
This is the single data-frame error contract: the row-buffer build path, the serde
columnar path, the parallel R→Rust reader, and validation all surface a DataFrameError.
Variants§
NotList(SEXPTYPE)
The SEXP is not a VECSXP; carries the SEXPTYPE it was.
NotDataFrame
The object does not inherit from data.frame.
NoNames
The list has no names attribute (columns must be named).
BadRowNames(String)
Could not extract nrow from row.names attribute.
UnequalLengths
Columns have unequal lengths (when promoting from a named list).
Fields
UnnamedColumns
A row could not be turned into named columns (e.g. unnamed list elements
in a IntoList-derived row). Replaces the old panic! on this path.
NoSuchColumn(String)
DataFrame::group_by referenced a column name that does not exist.
EmptyGroupColumns
DataFrame::group_by_multi was called with an empty column slice.
UnsupportedGroupColumn
DataFrame::group_by on a column type with no grouping semantics
(list-columns, complex, raw, bit64 integer64, …).
Fields
NotGroupedDataFrame
DataFrame::group_by_metadata was called on a frame that does not
inherit from grouped_df or rowwise_df.
GroupsNotDataFrame
A frame inherits from grouped_df or rowwise_df, but its groups
attribute is missing or is not a data frame with at least one column.
dplyr treats such a frame as corrupt, not as ungrouped (“The groups
attribute must be a data frame.”).
MissingGroupRows
The last column of a grouped frame’s groups attribute is not called
.rows (dplyr: “The last column of the groups attribute must be
called .rows.”).
BadGroupRows
The .rows column of a grouped frame’s groups attribute is not a
list of integer vectors (dplyr: “The .rows column must be list of
one-based integer vectors.”). Doubles are rejected, as in dplyr.
Fields
GroupIndexOutOfRange
A .rows index was < 1 or > nrow of the source frame: the
grouping metadata is stale. The message names the usual cause (the
frame was subset without dplyr loaded) and the fix.
Fields
GroupRowUncovered
No group’s .rows holds this row of the source frame: the grouping
metadata is stale (the message names the cause and the fix).
Fields
GroupRowDuplicated
Two .rows entries hold the same row of the source frame (in two
groups, or twice in one): the grouping metadata is stale (the message
names the cause and the fix).
Fields
Conversion(String)
A serde-driven schema/serialize/deserialize failure (the bridged
RSerdeError text) or another conversion failure carried as a message.
Trait Implementations§
Source§impl Clone for DataFrameError
impl Clone for DataFrameError
Source§impl Debug for DataFrameError
impl Debug for DataFrameError
Source§impl Display for DataFrameError
impl Display for DataFrameError
Source§impl Error for DataFrameError
impl Error for DataFrameError
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 DataFrameError
The condition a DataFrameError raises in R: its message, no class or
fields. It is AsDataFrame’s
IntoR::Error.
impl RConditionData for DataFrameError
The condition a DataFrameError raises in R: its message, no class or
fields. It is AsDataFrame’s
IntoR::Error.
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.Source§fn argument_message(&self) -> Option<String>
fn argument_message(&self) -> Option<String>
None. Read moreSource§#[doc(hidden)]fn __mx_keeps_internal_fields(&self) -> bool
#[doc(hidden)]fn __mx_keeps_internal_fields(&self) -> bool
data() are what they say, which the
generated Err arms pass on: a .mx_parent field is a cause
RCondition::with_parent attached (e$parent), a .mx_errors
field the failed elements of a container’s conversion (e$errors,
IntoRError::Elements).
Every other reserved name is refused (check_condition_data). True
for an RCondition, an
IntoRError and an RError
converted from either.Auto Trait Implementations§
impl Forget for DataFrameError
impl Freeze for DataFrameError
impl RefUnwindSafe for DataFrameError
impl Send for DataFrameError
impl Sync for DataFrameError
impl Unpin for DataFrameError
impl UnsafeUnpin for DataFrameError
impl UnwindSafe for DataFrameError
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: 48 bytes
Size for each variant:
NotList: 12 bytesNotDataFrame: 0 bytesNoNames: 0 bytesBadRowNames: 32 bytesUnequalLengths: 40 bytesUnnamedColumns: 0 bytesNoSuchColumn: 32 bytesEmptyGroupColumns: 0 bytesUnsupportedGroupColumn: 48 bytesNotGroupedDataFrame: 0 bytesGroupsNotDataFrame: 0 bytesMissingGroupRows: 0 bytesBadGroupRows: 48 bytesGroupIndexOutOfRange: 32 bytesGroupRowUncovered: 24 bytesGroupRowDuplicated: 32 bytesConversion: 32 bytes