pub struct ConditionBuilder {
message: Vec<String>,
kind: ConditionKind,
class: Option<Vec<String>>,
call: Option<Language>,
parent: Option<RCondition>,
trace: Option<List>,
}Expand description
Builder for constructing a Condition.
Fields§
§message: Vec<String>§kind: ConditionKind§class: Option<Vec<String>>§call: Option<Language>§parent: Option<RCondition>§trace: Option<List>Implementations§
Source§impl ConditionBuilder
impl ConditionBuilder
Sourcepub fn set_message(
self,
message: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn set_message( self, message: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Set the condition message. Accepts any iterable of strings.
Sourcepub fn set_kind(self, kind: ConditionKind) -> Self
pub fn set_kind(self, kind: ConditionKind) -> Self
Set the condition kind, which determines the base R class hierarchy.
Sourcepub fn set_class(
self,
class: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn set_class( self, class: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Set user-defined subclasses. These are prepended to the base classes
derived from ConditionKind.
Sourcepub fn set_parent(self, parent: impl Into<RCondition>) -> Self
pub fn set_parent(self, parent: impl Into<RCondition>) -> Self
Set a parent condition. Accepts anything that converts into RCondition,
including a Condition.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConditionBuilder
impl RefUnwindSafe for ConditionBuilder
impl !Send for ConditionBuilder
impl !Sync for ConditionBuilder
impl Unpin for ConditionBuilder
impl UnsafeUnpin for ConditionBuilder
impl UnwindSafe for ConditionBuilder
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> 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