Struct prelude::HostError
zaun_bot::prelude::HostError · Struct
pub struct HostError { … }What the host refused, mirroring the protocol’s error codes.
Fields
Section titled “Fields”code: String
Section titled “code: String”FORBIDDEN, NOT_FOUND, BAD_REQUEST, RATE_LIMITED, CONFLICT,
PAYLOAD_TOO_LARGE, NOT_GRANTED (a capability the bot lacks), UNSUPPORTED
(this host does not implement the call or this case of it yet), …
detail: Option<String>
Section titled “detail: Option<String>”The reason or field the host gave, if any.
retry_after_ms: Option<u64>
Section titled “retry_after_ms: Option<u64>”For RATE_LIMITED and BUSY.
Methods
Section titled “Methods”is_unsupported
Section titled “is_unsupported”pub fn is_unsupported(&self) -> boolWhether the host does not implement this call (or this case of it) yet: an older host, or a feature it lacks, such as volume without an Opus encoder. Fall back to what the bot did before; trying again will not help.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Display, Error