pub struct Condition {
pub message: Vec<String>,
pub kind: ConditionKind,
pub class: Option<Vec<String>>,
pub call: Option<Language>,
pub parent: Option<RCondition>,
pub trace: Option<List>,
}Expand description
Rust-native representation of an R condition.
This is the primary type to work with. Construct one via
ConditionBuilder::default() and convert it to R types via the
From/Into impls. To read a condition from R, use TryFrom<Robj> or
TryFrom<List>.
Fields§
§message: Vec<String>The condition message. Corresponds to the message character vector in R.
kind: ConditionKindThe base kind of condition, used to set the R class hierarchy.
class: Option<Vec<String>>User-defined subclasses prepended to the base classes. None means no
custom classes beyond those implied by kind.
call: Option<Language>The call that triggered the condition, or None for NULL.
parent: Option<RCondition>An optional parent condition, used to chain conditions with rlang.
trace: Option<List>An optional traceback. The structure is not validated.
Trait Implementations§
Source§impl From<Condition> for RCondition
impl From<Condition> for RCondition
Source§impl TryFrom<RCondition> for Condition
impl TryFrom<RCondition> for Condition
impl StructuralPartialEq for Condition
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl !Send for Condition
impl !Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more