pub struct Protocol {
pub steps: Vec<Step>,
}
Expand description
A high-level description of a series of actions to be taken.
This is what the end user will feed in (by way of a form).
Fields§
§steps: Vec<Step>
The component steps of the protocol.
Implementations§
Source§impl Protocol
impl Protocol
Sourcepub fn validate(&self) -> Result<(), ValidateError>
pub fn validate(&self) -> Result<(), ValidateError>
Ensures the validity of the protocol.
This method is called automatically during the conversion to Program
, but it can also be
useful to call it manually.
§Details
All protocols should end with a perfusion (in the final solution, usually water) for an unspecified duration (i.e. a bath). If this is not the case, something’s wrong with the protocol and we should refuse to run it.
Sourcepub fn as_program(&self) -> Result<Program, ValidateError>
pub fn as_program(&self) -> Result<Program, ValidateError>
Attempts to convert the protocol to a program
.
The protocol will first be validated.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
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