pub struct ScriptStep {
pub reply: ScriptedReply,
pub expected_purpose: Option<ModelPurpose>,
}Expand description
One entry of a script: what to answer, and what the call is expected to be.
Fields§
§reply: ScriptedReplyThe answer.
expected_purpose: Option<ModelPurpose>Purpose the call must carry. None accepts any purpose.
Implementations§
Source§impl ScriptStep
impl ScriptStep
Sourcepub fn new(reply: ScriptedReply) -> Self
pub fn new(reply: ScriptedReply) -> Self
A step that accepts any call.
Sourcepub fn expecting(self, purpose: ModelPurpose) -> Self
pub fn expecting(self, purpose: ModelPurpose) -> Self
Restricts the step to one purpose.
Trait Implementations§
Source§impl Clone for ScriptStep
impl Clone for ScriptStep
Auto Trait Implementations§
impl Freeze for ScriptStep
impl RefUnwindSafe for ScriptStep
impl Send for ScriptStep
impl Sync for ScriptStep
impl Unpin for ScriptStep
impl UnsafeUnpin for ScriptStep
impl UnwindSafe for ScriptStep
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