pub enum RpcError {
SerializationError,
TransportError(String),
Timeout,
Cancelled,
Internal(String),
ProtocolMismatch(String),
UnknownMethod(String),
UnknownService(String),
IncompatibleVersion {
expected: u16,
actual: u16,
},
}Expand description
Technical RPC error, categorized so callers can choose a policy
(retry / fallback / log / fatal) via RpcError::is_retryable.
Variants§
SerializationError
Payload serialization/deserialization failure.
TransportError(String)
iceoryx2 transport failure (loan, send, receive, port creation).
Timeout
Waiting deadline exceeded.
Cancelled
The call was cancelled by a global shutdown (Ctrl+C).
Internal(String)
Unexpected internal error / invariant violation.
ProtocolMismatch(String)
The service on the bus is not the one this build asks for.
UnknownMethod(String)
The provider has no method of that name on the requested service.
Answered immediately by the provider instead of leaving the call to time out, so a typo or a stale client is diagnosable.
UnknownService(String)
No service is registered under the requested id on that channel.
IncompatibleVersion
The provider’s service interface version differs from the requested one.
Emitted by the provider before dispatching, so the caller learns the
contract mismatch instead of waiting for a timeout. No amount of retrying
resolves it: both peers must be rebuilt with the same #[service(version)].
Implementations§
Source§impl RpcError
impl RpcError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true when retrying the same call may succeed.
Transient failures (transport, timeout) are retryable; serialization
failures, internal errors, RpcError::ProtocolMismatch,
RpcError::IncompatibleVersion, RpcError::UnknownMethod and
RpcError::UnknownService — which no amount of retrying resolves — are
not.
Trait Implementations§
Source§impl Archive for RpcError
impl Archive for RpcError
Source§type Resolver = RpcErrorResolver
type Resolver = RpcErrorResolver
Source§fn resolve(
&self,
resolver: <RpcError as Archive>::Resolver,
out: Place<<RpcError as Archive>::Archived>,
)
fn resolve( &self, resolver: <RpcError as Archive>::Resolver, out: Place<<RpcError as Archive>::Archived>, )
Source§const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
serialize. Read moreimpl 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 Forget for RpcError
impl Freeze for RpcError
impl Move 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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<T, S> SerializeUnsized<S> for T
impl<T, S> SerializeUnsized<S> for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more