pub struct SafetyInvariantDecl {
pub condition: Expr,
pub panic_msg: String,
pub span: Span,
}Expand description
Static & Runtime Safety Guard: safety_invariant(self.voltage > 10.5, "LOW_BATTERY");
Fields§
§condition: Expr§panic_msg: String§span: SpanTrait Implementations§
Source§impl Clone for SafetyInvariantDecl
impl Clone for SafetyInvariantDecl
Source§impl Debug for SafetyInvariantDecl
impl Debug for SafetyInvariantDecl
Source§impl<'de> Deserialize<'de> for SafetyInvariantDecl
impl<'de> Deserialize<'de> for SafetyInvariantDecl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SafetyInvariantDecl
impl PartialEq for SafetyInvariantDecl
Source§impl Serialize for SafetyInvariantDecl
impl Serialize for SafetyInvariantDecl
impl StructuralPartialEq for SafetyInvariantDecl
Auto Trait Implementations§
impl Freeze for SafetyInvariantDecl
impl RefUnwindSafe for SafetyInvariantDecl
impl Send for SafetyInvariantDecl
impl Sync for SafetyInvariantDecl
impl Unpin for SafetyInvariantDecl
impl UnsafeUnpin for SafetyInvariantDecl
impl UnwindSafe for SafetyInvariantDecl
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