pub struct MockHook { /* private fields */ }
Available on debug-assertions enabled only.
Implementations§
Source§impl MockHook
impl MockHook
pub fn new(name: &'static str) -> Self
pub fn expect_calls(&mut self, expected_calls: usize) -> &mut Self
pub fn hook_fn(&self) -> impl BeforeAllFn + use<>
pub fn on_start_fn(&self) -> impl OnStartFn + use<>
pub fn before_completion_fn(&self) -> impl BeforeCompletionFn + use<>
pub fn after_completion_fn(&self) -> impl AfterCompletionFn + use<>
pub fn after_tool_fn(&self) -> impl AfterToolFn + use<>
pub fn before_tool_fn(&self) -> impl BeforeToolFn + use<>
pub fn message_hook_fn(&self) -> impl MessageHookFn + use<>
pub fn stop_hook_fn(&self) -> impl OnStopFn + use<>
pub fn on_stream_fn(&self) -> impl OnStreamFn + use<>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockHook
impl RefUnwindSafe for MockHook
impl Send for MockHook
impl Sync for MockHook
impl Unpin for MockHook
impl UnwindSafe for MockHook
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more