pub enum ChannelAccessError {
NotRegistered {
name: String,
},
Quiesced {
name: String,
reason: String,
},
RosterUnavailable {
message: String,
},
ConsoleNamespace {
name: String,
},
ConsoleTapTarget {
name: String,
},
ConsoleTapLimit {
name: String,
limit: usize,
},
}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.
ConsoleNamespace
A connection asked to publish under console.. Only the server writes
there, so a console reading those subjects is never shown a client’s
record as the server’s. Subscribing stays open: the console is itself
a connection that reads them.
ConsoleTapTarget
A subscribe to console.tap.<target> named no target, or a target
under console.: the tap never taps the console’s own records.
ConsoleTapLimit
A subscribe would start one more live tap than the server’s bound.
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()