pub struct Component {
pub name: String,
pub input_sorts: Vec<String>,
pub output_sort: String,
pub precondition: String,
pub postcondition: String,
}Expand description
A library component with pre/post-conditions.
Fields§
§name: StringName of the component (e.g., function name).
input_sorts: Vec<String>Input sorts.
output_sort: StringOutput sort.
precondition: StringFormal precondition.
postcondition: StringFormal postcondition.
Implementations§
Source§impl Component
impl Component
Sourcepub fn new(
name: impl Into<String>,
input_sorts: Vec<String>,
output_sort: impl Into<String>,
precondition: impl Into<String>,
postcondition: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, input_sorts: Vec<String>, output_sort: impl Into<String>, precondition: impl Into<String>, postcondition: impl Into<String>, ) -> Self
Build a new library component.
Sourcepub fn output_matches(&self, target_sort: &str) -> bool
pub fn output_matches(&self, target_sort: &str) -> bool
Check whether the component’s output sort matches the target.
Trait Implementations§
impl Eq for Component
impl StructuralPartialEq for Component
Auto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnsafeUnpin for Component
impl UnwindSafe for Component
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