pub enum ErrorCode {
BadSchema,
UnknownType,
PayloadTooLarge,
NoResolver,
NotPermitted,
ResolveFailed,
UnknownDisplay,
NotOwner,
VersionUnsupported,
Unknown(String),
}Expand description
Machine-readable rejection causes.
Variants§
BadSchema
The message parsed as JSON but is not a valid message.
UnknownType
The type field names a message this daemon does not implement.
PayloadTooLarge
The line exceeded crate::MAX_PAYLOAD_BYTES.
NoResolver
A query-form request arrived with no resolver configured.
NotPermitted
A resolver exists, and the user has not permitted this daemon to ground for a client.
Distinct from Self::NoResolver, which says grounding is not set up. This says it
is set up and was refused, which is a different thing for a client to do something
about: one is a configuration problem and the other is a person declining.
Drawing is never refused this way. Any peer that reaches the socket can draw, since a process running as the user could open its own window and draw anyway. Grounding is the only capability Arin actually holds, because it is the one backed by the Screen Recording grant.
ResolveFailed
A resolver ran and could not ground the query.
UnknownDisplay
The display_id does not name a connected display.
NotOwner
The annotation exists but belongs to a different session.
VersionUnsupported
The v field names an incompatible major version.
Unknown(String)
A code introduced by a newer daemon than this build knows about.