#[non_exhaustive]pub enum ScopeCallError {
NotSupported {
op: &'static str,
},
Refused {
code: String,
message: String,
},
Timeout,
ConnectionClosed,
Protocol(String),
}Expand description
Errors returned by ModuleHandle::scope_sync, ModuleHandle::scope_apply and
ModuleHandle::scope_describe.
Non-exhaustive so a later failure kind can be added without breaking
callers’ matches. Match the variants you handle, and treat any other variant
as a call whose effect you cannot know: after scope_sync or scope_apply,
send a full scope_sync at a higher generation rather than assume the change
did or did not apply.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotSupported
HELLO_ACK did not advertise the operation (or its required capability), so nothing was sent.
Refused
The daemon refused the request with a channel-0 Error frame. code is
the daemon’s code as sent, to compare against the constants in
subc_protocol::error_codes (SCOPE_SYNC_STALE,
SCOPE_SYNC_NOT_AUTHORITY, SCOPE_LIVE_LIMIT_EXCEEDED, …).
Timeout
No reply arrived in time. The daemon may still have applied the change.
ConnectionClosed
The connection closed before a reply arrived.
Protocol(String)
The reply could not be read, or was a reply to a different op.
Implementations§
Trait Implementations§
Source§impl Clone for ScopeCallError
impl Clone for ScopeCallError
Source§impl Debug for ScopeCallError
impl Debug for ScopeCallError
Source§impl Display for ScopeCallError
impl Display for ScopeCallError
impl Eq for ScopeCallError
Source§impl Error for ScopeCallError
impl Error for ScopeCallError
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()