pub enum Behavior {
Succeed,
Fail(FailureClass),
Unreachable,
CommitThenDrop,
LoseRequest,
Hang,
}Expand description
What the FakeRemote does with one request.
Variants§
Succeed
Apply the request and answer.
Fail(FailureClass)
Refuse the request without applying it, with this failure class.
Unreachable
Refuse the connection: nothing was sent, nothing applied.
CommitThenDrop
Apply the request, then drop the connection before answering. The caller sees an ambiguous failure for an effect that happened.
LoseRequest
Lose the request: nothing applied, and the caller sees an ambiguous
failure. Indistinguishable from CommitThenDrop for the caller.
Hang
Never answer.
Trait Implementations§
impl Copy for Behavior
impl Eq for Behavior
impl StructuralPartialEq for Behavior
Auto Trait Implementations§
impl Freeze for Behavior
impl RefUnwindSafe for Behavior
impl Send for Behavior
impl Sync for Behavior
impl Unpin for Behavior
impl UnsafeUnpin for Behavior
impl UnwindSafe for Behavior
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