pub struct A2aTaskHandlerBuilder { /* private fields */ }Expand description
Sub-builder for a single custom tasks/send handler. Call and
to return to the parent A2aMockBuilder.
Implementations§
Source§impl A2aTaskHandlerBuilder
impl A2aTaskHandlerBuilder
Sourcepub fn matching_message(self, pattern: impl Into<String>) -> Self
pub fn matching_message(self, pattern: impl Into<String>) -> Self
Set the regular expression matched against the first message part’s text.
Sourcepub fn responding_with(self, text: impl Into<String>, is_error: bool) -> Self
pub fn responding_with(self, text: impl Into<String>, is_error: bool) -> Self
Set the response text and whether this handler models a failed task.
Sourcepub fn and(self) -> A2aMockBuilder
pub fn and(self) -> A2aMockBuilder
Finish this handler and return to the parent builder.
Auto Trait Implementations§
impl Freeze for A2aTaskHandlerBuilder
impl RefUnwindSafe for A2aTaskHandlerBuilder
impl Send for A2aTaskHandlerBuilder
impl Sync for A2aTaskHandlerBuilder
impl Unpin for A2aTaskHandlerBuilder
impl UnsafeUnpin for A2aTaskHandlerBuilder
impl UnwindSafe for A2aTaskHandlerBuilder
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