pub enum RunError {
Io(Error),
Agent(AgentError),
MalformedEvent(Error),
InitNotFirst(String),
StdinClosed,
}Expand description
Errors surfaced by run that are fatal to the agent process.
Backend / object-store errors that occur after init are not in
here — they are folded into per-event complete payloads by the
[Agent].
Variants§
Io(Error)
Underlying transport (stdin/stdout) failed.
Agent(AgentError)
Agent dispatch error (transport or serialization).
MalformedEvent(Error)
An incoming line was not valid LFS JSON, or an outgoing event could not be serialized. Either is fatal — the protocol cannot continue past a parse mismatch.
InitNotFirst(String)
First event was not init. The LFS spec requires it. The
payload is the Debug rendering of the offending event,
captured at construction time.
StdinClosed
Stdin closed before any event was read.
Implementations§
Source§impl RunError
impl RunError
Sourcepub fn is_broken_pipe(&self) -> bool
pub fn is_broken_pipe(&self) -> bool
true if this error is a BrokenPipe / WriteZero from
stdout closing — the bin-side REPL turns those into a clean
exit. Walks both the direct Io variant and the nested
Agent(AgentError::Io) variant produced by writes that flow
through the agent’s [write_event][crate::lfs::agent::write_event].
Trait Implementations§
Source§impl Error for RunError
impl Error for RunError
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 RunError
impl !RefUnwindSafe for RunError
impl Send for RunError
impl Sync for RunError
impl Unpin for RunError
impl UnsafeUnpin for RunError
impl !UnwindSafe for RunError
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> ErrorExt for T
impl<T> ErrorExt for 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> 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.