pub struct BehaviorError {
pub message: String,
/* private fields */
}Expand description
A unified failure for run_behavior, carrying a stable string code so the
conformance runner can compare against expression / plan / behavior codes alike.
Fields§
§message: StringImplementations§
Source§impl BehaviorError
impl BehaviorError
Sourcepub fn new(code: impl Into<String>, message: impl Into<String>) -> Self
pub fn new(code: impl Into<String>, message: impl Into<String>) -> Self
Construct a coded behavior error. Public so the straight-line codegen surface
(bc#39) can raise the same fail-closed codes/messages as run_behavior
(UNKNOWN_COMPONENT / UNKNOWN_ENTRY / UNKNOWN_NODE_KIND) without depending
on the private BehaviorFailureCode enum.
Trait Implementations§
Source§impl Clone for BehaviorError
impl Clone for BehaviorError
Source§fn clone(&self) -> BehaviorError
fn clone(&self) -> BehaviorError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BehaviorError
impl Debug for BehaviorError
Source§impl Display for BehaviorError
impl Display for BehaviorError
Source§impl Error for BehaviorError
impl Error for BehaviorError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ExprFailure> for BehaviorError
impl From<ExprFailure> for BehaviorError
Source§fn from(e: ExprFailure) -> Self
fn from(e: ExprFailure) -> Self
Converts to this type from the input type.
Source§impl From<PlanFailure> for BehaviorError
impl From<PlanFailure> for BehaviorError
Source§fn from(e: PlanFailure) -> Self
fn from(e: PlanFailure) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BehaviorError
impl RefUnwindSafe for BehaviorError
impl Send for BehaviorError
impl Sync for BehaviorError
impl Unpin for BehaviorError
impl UnsafeUnpin for BehaviorError
impl UnwindSafe for BehaviorError
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