pub enum AcpError {
Transport(String),
ClientError(String),
CapabilityUnavailable(String),
ChannelClosed,
TerminalTimeout {
output: String,
},
StdinTooLarge {
size: usize,
},
BrokenPipe,
ResourceLink(String),
}Expand description
Errors produced by the ACP server and its subsystems.
Each variant corresponds to a distinct failure domain so callers can handle or propagate them appropriately.
§Examples
use zeph_acp::AcpError;
let err = AcpError::Transport("connection reset".to_owned());
assert!(err.to_string().contains("transport error"));
let err = AcpError::TerminalTimeout { output: "partial".to_owned() };
assert!(err.to_string().contains("timed out"));Variants§
Transport(String)
The underlying JSON-RPC transport (stdio, HTTP, WebSocket) encountered an I/O error.
ClientError(String)
The connected IDE returned a protocol-level error response.
The IDE did not advertise the required ACP capability.
ChannelClosed
The internal async channel between the agent loop and the ACP handler was dropped.
This typically means the session has already terminated.
TerminalTimeout
A terminal command did not complete within the configured timeout.
output contains whatever the terminal produced before the timeout.
StdinTooLarge
The stdin data payload exceeds the 64 KiB limit.
BrokenPipe
The terminal’s stdin channel was closed by the IDE before the write completed.
ResourceLink(String)
A ResourceLink URI could not be resolved (bad scheme, path traversal, SSRF, etc.).
Trait Implementations§
Source§impl Error for AcpError
impl Error for AcpError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AcpError
impl RefUnwindSafe for AcpError
impl Send for AcpError
impl Sync for AcpError
impl Unpin for AcpError
impl UnsafeUnpin for AcpError
impl UnwindSafe for AcpError
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> 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 moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.