pub enum ChannelAccessError {
NotRegistered {
name: String,
},
Quiesced {
name: String,
reason: String,
},
RosterUnavailable {
message: String,
},
}Expand description
The hot-path admission refusal.
Produced by the roster admission funnel and rendered to the wire with a
reason code. Distinct from ChannelRegistryError because this one crosses
to a client: every variant here has to answer Self::reason_code.
Variants§
NotRegistered
No entry of this name is on the roster.
Quiesced
The entry is on the roster but quiesced.
Fields
The roster lock is poisoned, so no admission decision can be made.
Implementations§
Source§impl ChannelAccessError
impl ChannelAccessError
Sourcepub const fn reason_code(&self) -> u16
pub const fn reason_code(&self) -> u16
The stable wire reason code for this refusal.
The two roster codes are minted in liminal-protocol so an SDK client —
which depends on that crate and not on this one — names them instead of
hardcoding a literal. Self::RosterUnavailable keeps the
undifferentiated server code: it is an internal fault, not a statement
about the channel, and claiming otherwise would be a typed lie.
Trait Implementations§
Source§impl Debug for ChannelAccessError
impl Debug for ChannelAccessError
Source§impl Display for ChannelAccessError
impl Display for ChannelAccessError
Source§impl Error for ChannelAccessError
impl Error for ChannelAccessError
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()