pub struct Stubbed {
pub def: Arc<str>,
pub atom: String,
pub returned: Option<Value>,
pub raised: Option<String>,
pub calls: usize,
pub explicit: bool,
pub from_the_call: bool,
}Fields§
§def: Arc<str>§atom: String§returned: Option<Value>What it answered. None for a stub that answers from the call (§21.3 rule 3) and was never
called — there is no single value to name, and inventing one for the report would be the
same mistake the stub itself exists to avoid. None too for a stub that failed, which
Stubbed::raised names instead.
raised: Option<String>What it raised, for a stub that answers by failing. §21.3 rule 1’s obligation is to say what the default did, and “returned nothing” is not what a raise did.
calls: usize§explicit: boolTrue when the test named it, false when §21.3 rule 1 supplied it.
from_the_call: boolTrue when the stub is a body over the call’s arguments rather than a fixed value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stubbed
impl RefUnwindSafe for Stubbed
impl Send for Stubbed
impl Sync for Stubbed
impl Unpin for Stubbed
impl UnwindSafe for Stubbed
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