Skip to main content

MessageType

Enum MessageType 

Source
#[non_exhaustive]
pub enum MessageType {
Show 62 variants SessionOpen(SessionOpenPayload), SessionChallenge(SessionChallengePayload), SessionAuthenticate(SessionAuthenticatePayload), SessionAccepted(SessionAcceptedPayload), SessionUnauthenticated(SessionUnauthenticatedPayload), SessionRejected(SessionRejectedPayload), SessionRefresh(SessionRefreshPayload), SessionEvicted(SessionEvictedPayload), SessionClose(SessionClosePayload), SessionPing(SessionPingPayload), SessionPong(SessionPongPayload), SessionAck(SessionAckPayload), SessionListJobs(SessionListJobsPayload), SessionJobs(SessionJobsPayload), Ping(PingPayload), Pong(PongPayload), Ack(AckPayload), Nack(NackPayload), Cancel(CancelPayload), CancelAccepted(CancelAcceptedPayload), CancelRefused(CancelRefusedPayload), Interrupt(InterruptPayload), Resume(ResumePayload), Backpressure(BackpressurePayload), ToolInvoke(ToolInvokePayload), ToolResult(ToolResultPayload), ToolError(ToolErrorPayload), JobAccepted(JobAcceptedPayload), JobStarted(JobStartedPayload), JobProgress(JobProgressPayload), JobHeartbeat(JobHeartbeatPayload), JobCompleted(JobCompletedPayload), JobFailed(JobFailedPayload), JobCancelled(JobCancelledPayload), JobResultChunk(JobResultChunkPayload), StreamOpen(StreamOpenPayload), StreamChunk(StreamChunkPayload), StreamClose(StreamClosePayload), StreamError(StreamErrorPayload), PermissionRequest(PermissionRequestPayload), PermissionGrant(PermissionGrantPayload), PermissionDeny(PermissionDenyPayload), LeaseGranted(LeaseGrantedPayload), LeaseExtended(LeaseExtendedPayload), LeaseRevoked(LeaseRevokedPayload), LeaseRefresh(LeaseRefreshPayload), Subscribe(SubscribePayload), SubscribeAccepted(SubscribeAcceptedPayload), SubscribeEvent(SubscribeEventPayload), Unsubscribe(UnsubscribePayload), SubscribeClosed(SubscribeClosedPayload), JobSubscribe(JobSubscribePayload), JobSubscribed(JobSubscribedPayload), JobUnsubscribe(JobUnsubscribePayload), ArtifactPut(ArtifactPutPayload), ArtifactFetch(ArtifactFetchPayload), ArtifactRef(ArtifactRefPayload), ArtifactRelease(ArtifactReleasePayload), EventEmit(EventEmitPayload), Log(LogPayload), Metric(MetricPayload), TraceSpan(TraceSpanPayload),
}
Expand description

Tagged enum of every protocol message payload (RFC §6.2).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

SessionOpen(SessionOpenPayload)

session.open

§

SessionChallenge(SessionChallengePayload)

session.challenge

§

SessionAuthenticate(SessionAuthenticatePayload)

session.authenticate

§

SessionAccepted(SessionAcceptedPayload)

session.accepted

§

SessionUnauthenticated(SessionUnauthenticatedPayload)

session.unauthenticated

§

SessionRejected(SessionRejectedPayload)

session.rejected

§

SessionRefresh(SessionRefreshPayload)

session.refresh

§

SessionEvicted(SessionEvictedPayload)

session.evicted

§

SessionClose(SessionClosePayload)

session.close

§

SessionPing(SessionPingPayload)

session.ping (ARCP v1.1 §6.4) — session-scoped heartbeat.

Canonical heartbeat per ARCP v1.1; the generic Ping/Pong variants below were introduced under v1.0’s draft scaffolding and remain only for backwards compatibility.

§

SessionPong(SessionPongPayload)

session.pong (ARCP v1.1 §6.4) — response to session.ping.

§

SessionAck(SessionAckPayload)

session.ack (ARCP v1.1 §6.5) — client-side flow-control ack.

§

SessionListJobs(SessionListJobsPayload)

session.list_jobs (ARCP v1.1 §6.6) — read-only job inventory request.

§

SessionJobs(SessionJobsPayload)

session.jobs (ARCP v1.1 §6.6) — response to session.list_jobs.

§

Ping(PingPayload)

ping

§

Pong(PongPayload)

pong

§

Ack(AckPayload)

ack

§

Nack(NackPayload)

nack

§

Cancel(CancelPayload)

cancel

§

CancelAccepted(CancelAcceptedPayload)

cancel.accepted

§

CancelRefused(CancelRefusedPayload)

cancel.refused

§

Interrupt(InterruptPayload)

interrupt

§

Resume(ResumePayload)

resume

§

Backpressure(BackpressurePayload)

backpressure

§

ToolInvoke(ToolInvokePayload)

tool.invoke

§

ToolResult(ToolResultPayload)

tool.result

§

ToolError(ToolErrorPayload)

tool.error

§

JobAccepted(JobAcceptedPayload)

job.accepted

§

JobStarted(JobStartedPayload)

job.started

§

JobProgress(JobProgressPayload)

job.progress

§

JobHeartbeat(JobHeartbeatPayload)

job.heartbeat

§

JobCompleted(JobCompletedPayload)

job.completed

§

JobFailed(JobFailedPayload)

job.failed

§

JobCancelled(JobCancelledPayload)

job.cancelled

§

JobResultChunk(JobResultChunkPayload)

job.result_chunk (ARCP v1.1 §8.4) — one fragment of a streamed final result. Terminated by job.completed carrying the same result_id.

§

StreamOpen(StreamOpenPayload)

stream.open

§

StreamChunk(StreamChunkPayload)

stream.chunk

§

StreamClose(StreamClosePayload)

stream.close

§

StreamError(StreamErrorPayload)

stream.error

§

PermissionRequest(PermissionRequestPayload)

permission.request

§

PermissionGrant(PermissionGrantPayload)

permission.grant

§

PermissionDeny(PermissionDenyPayload)

permission.deny

§

LeaseGranted(LeaseGrantedPayload)

lease.granted

§

LeaseExtended(LeaseExtendedPayload)

lease.extended

§

LeaseRevoked(LeaseRevokedPayload)

lease.revoked

§

LeaseRefresh(LeaseRefreshPayload)

lease.refresh

§

Subscribe(SubscribePayload)

subscribe

§

SubscribeAccepted(SubscribeAcceptedPayload)

subscribe.accepted

§

SubscribeEvent(SubscribeEventPayload)

subscribe.event

§

Unsubscribe(UnsubscribePayload)

unsubscribe

§

SubscribeClosed(SubscribeClosedPayload)

subscribe.closed

§

JobSubscribe(JobSubscribePayload)

job.subscribe (ARCP v1.1 §7.6) — cross-session attach to a running job.

§

JobSubscribed(JobSubscribedPayload)

job.subscribed (ARCP v1.1 §7.6) — runtime acknowledgement of a job.subscribe request.

§

JobUnsubscribe(JobUnsubscribePayload)

job.unsubscribe (ARCP v1.1 §7.6) — terminate a previously acknowledged job subscription.

§

ArtifactPut(ArtifactPutPayload)

artifact.put

§

ArtifactFetch(ArtifactFetchPayload)

artifact.fetch

§

ArtifactRef(ArtifactRefPayload)

artifact.ref

§

ArtifactRelease(ArtifactReleasePayload)

artifact.release

§

EventEmit(EventEmitPayload)

event.emit

§

Log(LogPayload)

log

§

Metric(MetricPayload)

metric

§

TraceSpan(TraceSpanPayload)

trace.span

Implementations§

Source§

impl MessageType

Source

pub const fn type_name(&self) -> &'static str

Wire-level discriminator string for this variant.

Source

pub const fn is_handshake(&self) -> bool

True if this variant is one of the handshake messages allowed before session.accepted (RFC §8.1).

Source

pub const fn is_countable_event(&self) -> bool

True if this variant participates in event_seq and is therefore subject to session.ack flow control (ARCP v1.1 §6.5).

Session-control envelopes (handshake, heartbeat, ack, close, evict, refresh) are NOT counted. Everything else — job events, tool results, stream chunks, telemetry, artifacts, subscriptions — IS.

Trait Implementations§

Source§

impl Clone for MessageType

Source§

fn clone(&self) -> MessageType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MessageType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MessageType

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<MessageType, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for MessageType

Source§

fn eq(&self, other: &MessageType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for MessageType

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MessageType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,