pub enum TypedChannelError {
ChannelNotFound {
name: String,
registered: Vec<String>,
},
SchemaMismatch(String),
CapabilityGate(String),
LifetimeViolation {
name: String,
count: u32,
},
Transport(String),
}Expand description
Runtime errors raised by the typed-channel layer.
Each variant mirrors a compile-time diagnostic so a program that would have been rejected by the Fase 13.b type checker is also rejected here as defence-in-depth (relevant for cross-process publish/discover where the receiver cannot rerun static analysis).
Variants§
ChannelNotFound
Channel name not in the registry.
SchemaMismatch(String)
Payload type does not match the channel schema.
The compile-time check (Fase 13.b _check_emit) catches this
for statically-known programs; this runtime check is
defence-in-depth.
CapabilityGate(String)
publish lacks a shield (D8) or discover targets an
unpublishable channel / forged capability.
LifetimeViolation
An affine/linear handle was used after consumption.
Affine: at most one consumption (use OK; drop OK; reuse rejected).
Linear: exactly one consumption (use required; reuse rejected).
Persistent (!Channel): unrestricted reuse (no enforcement).
Transport(String)
Underlying transport failure (closed channel, dropped sender).
Trait Implementations§
Source§impl Clone for TypedChannelError
impl Clone for TypedChannelError
Source§fn clone(&self) -> TypedChannelError
fn clone(&self) -> TypedChannelError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TypedChannelError
impl Debug for TypedChannelError
Source§impl Display for TypedChannelError
impl Display for TypedChannelError
impl Eq for TypedChannelError
Source§impl Error for TypedChannelError
impl Error for TypedChannelError
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()
Source§impl From<TypedChannelError> for DispatchError
impl From<TypedChannelError> for DispatchError
Source§fn from(e: TypedChannelError) -> Self
fn from(e: TypedChannelError) -> Self
Source§impl PartialEq for TypedChannelError
impl PartialEq for TypedChannelError
Source§fn eq(&self, other: &TypedChannelError) -> bool
fn eq(&self, other: &TypedChannelError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TypedChannelError
Auto Trait Implementations§
impl Freeze for TypedChannelError
impl RefUnwindSafe for TypedChannelError
impl Send for TypedChannelError
impl Sync for TypedChannelError
impl Unpin for TypedChannelError
impl UnsafeUnpin for TypedChannelError
impl UnwindSafe for TypedChannelError
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.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 more