pub enum HostPipeError {
HostNotConnected,
WriteFailed(Error),
Serialize(Error),
BufferOverflow,
}Expand description
Reasons send_command / send_event can fail synchronously.
HostNotConnected is reserved for cases where the caller wants to
fail-fast instead of buffering (CPD-3 will choose whichever
fits per command kind). The default send_command code path
buffers; see try_send_command_no_buffer for the fail-fast variant.
Variants§
HostNotConnected
No host is currently connected and the caller asked to fail
rather than buffer (try_send_command_no_buffer; first caller is
the UI-liveness prober, SPEC_LAUNCHER_TEARDOWN_BACKSTOP Phase 1).
WriteFailed(Error)
Underlying write to the pipe failed.
Serialize(Error)
Frame failed to serialize. Should be impossible for well- formed Command / Event variants but kept as a result variant for defense-in-depth.
BufferOverflow
Pending buffer is full and we couldn’t drop the oldest entry
to make room (e.g. caller asked for no-overflow semantics).
Default send_command does drop-oldest + emit-failed, so
callers won’t see this from the public API today.
Trait Implementations§
Source§impl Debug for HostPipeError
impl Debug for HostPipeError
Source§impl Display for HostPipeError
impl Display for HostPipeError
Source§impl Error for HostPipeError
impl Error for HostPipeError
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 !RefUnwindSafe for HostPipeError
impl !UnwindSafe for HostPipeError
impl Freeze for HostPipeError
impl Send for HostPipeError
impl Sync for HostPipeError
impl Unpin for HostPipeError
impl UnsafeUnpin for HostPipeError
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.