pub enum ScriptOutcome {
Passed,
Failed {
message: String,
},
}Expand description
What a post_request script decided about a response.
Not a Result<(), SendraError>, because neither outcome is an error in the
sense the rest of this crate uses the word: the response came back, and the
script is a check on it, exactly as an assertion is. A script that throws
has worked — it has reported that the response was not what the file
expected — and the front-end that receives this treats it the way it treats
a failed assertion. See the CLI’s exit module for where that lands in a
summary and an exit code.
Variants§
Passed
The script ran to completion without throwing.
Failed
The script threw, or hit a runtime error.
The two are not told apart here; see failure_message
for why, and for what the string contains in each case.
Implementations§
Trait Implementations§
Source§impl Clone for ScriptOutcome
impl Clone for ScriptOutcome
Source§fn clone(&self) -> ScriptOutcome
fn clone(&self) -> ScriptOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScriptOutcome
impl Debug for ScriptOutcome
impl Eq for ScriptOutcome
Source§impl PartialEq for ScriptOutcome
impl PartialEq for ScriptOutcome
impl StructuralPartialEq for ScriptOutcome
Auto Trait Implementations§
impl Freeze for ScriptOutcome
impl RefUnwindSafe for ScriptOutcome
impl Send for ScriptOutcome
impl Sync for ScriptOutcome
impl Unpin for ScriptOutcome
impl UnsafeUnpin for ScriptOutcome
impl UnwindSafe for ScriptOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.