pub enum SendCompletion {
WhenSettled,
WhenCreated,
}Expand description
When a SendMessage call should return.
The A2A default is the waiting one, which is easy to get backwards:
SendMessageConfiguration.return_immediately is a proto3 bool and so
defaults to false, and false obliges the server to wait until the task
settles before returning (spec/a2a.proto:155). A conformant client that
sends no configuration at all — which is what the official SDKs do — is
therefore promised a settled task, not an acknowledgement.
Modelled as an enum rather than the wire’s bare bool because
send_message(…, false) at a call site reads as “don’t” with no way to tell
what is being declined, and the polarity is already the trap here.
Lives in the domain because both directions need it: the server decodes it
from the request, and the client Transport port sets it on the way out.
Variants§
WhenSettled
Wait until the task reaches a terminal or interrupted state. The spec default, and what a client that sent no configuration is owed.
WhenCreated
Return as soon as the message is accepted, even if the agent is still
working (return_immediately = true).
What a caller doing its own follow-up wants: it keeps its deadline in charge instead of inheriting the server’s.
Implementations§
Source§impl SendCompletion
impl SendCompletion
Sourcepub fn return_immediately(self) -> bool
pub fn return_immediately(self) -> bool
The wire spelling. Note the inversion — this is why the enum exists.
Trait Implementations§
Source§impl Clone for SendCompletion
impl Clone for SendCompletion
Source§fn clone(&self) -> SendCompletion
fn clone(&self) -> SendCompletion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SendCompletion
Source§impl Debug for SendCompletion
impl Debug for SendCompletion
Source§impl Default for SendCompletion
impl Default for SendCompletion
Source§fn default() -> SendCompletion
fn default() -> SendCompletion
impl Eq for SendCompletion
Source§impl PartialEq for SendCompletion
impl PartialEq for SendCompletion
impl StructuralPartialEq for SendCompletion
Auto Trait Implementations§
impl Freeze for SendCompletion
impl RefUnwindSafe for SendCompletion
impl Send for SendCompletion
impl Sync for SendCompletion
impl Unpin for SendCompletion
impl UnsafeUnpin for SendCompletion
impl UnwindSafe for SendCompletion
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
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
key and return true if they are equal.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>
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>
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