pub enum RpcError {
TooLarge,
Encode,
Send(String),
Timeout,
Incomplete {
received: usize,
total: u16,
},
ChannelClosed,
Busy,
}Expand description
Why a call did not complete.
Variants§
TooLarge
The request body exceeds aux_rpc::MAX_REQUEST_BODY. The HTTP
caller should surface a 413.
Encode
A request field (target, path, content type, ticket) is too long to encode. The HTTP caller should surface a 400.
Send(String)
The aux egress failed to send the request datagram.
Timeout
No response arrived before the bound elapsed.
Incomplete
Some fragments arrived and the rest did not. Distinct from Timeout
on purpose: “the drone never answered” and “the radio dropped a
fragment” are different faults with different operator actions.
ChannelClosed
The consumer torn down between the request and the response, so the pending entry was removed. The caller may retry.
Busy
Too many calls already in flight. Shedding here is honest: the lane cannot deliver them, and queueing would only convert a fast 503 into a slow timeout.
Trait Implementations§
impl Eq for RpcError
Source§impl Error for RpcError
impl Error for RpcError
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()
impl StructuralPartialEq for RpcError
Auto Trait Implementations§
impl Freeze for RpcError
impl RefUnwindSafe for RpcError
impl Send for RpcError
impl Sync for RpcError
impl Unpin for RpcError
impl UnsafeUnpin for RpcError
impl UnwindSafe for RpcError
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.