pub struct SafetyConstraint {
pub name: String,
pub formula: String,
pub enforced: bool,
}Expand description
Safety constraint for self-modification
Fields§
§name: String§formula: String§enforced: boolImplementations§
Source§impl SafetyConstraint
impl SafetyConstraint
pub fn new(name: impl Into<String>, formula: impl Into<String>) -> Self
pub fn always_safe() -> Self
pub fn eventually_terminates() -> Self
Trait Implementations§
Source§impl Clone for SafetyConstraint
impl Clone for SafetyConstraint
Source§fn clone(&self) -> SafetyConstraint
fn clone(&self) -> SafetyConstraint
Returns a duplicate of the value. Read more
1.0.0 · 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 SafetyConstraint
impl Debug for SafetyConstraint
Source§impl<'de> Deserialize<'de> for SafetyConstraint
impl<'de> Deserialize<'de> for SafetyConstraint
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
Auto Trait Implementations§
impl Freeze for SafetyConstraint
impl RefUnwindSafe for SafetyConstraint
impl Send for SafetyConstraint
impl Sync for SafetyConstraint
impl Unpin for SafetyConstraint
impl UnwindSafe for SafetyConstraint
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