accesskit_atspi_common/
error.rs1use std::fmt;
7
8#[derive(Debug)]
9pub enum Error {
10 Defunct,
11 UnsupportedInterface,
12 TooManyChildren,
13 IndexOutOfRange,
14 TooManyCharacters,
15 UnsupportedTextGranularity,
16}
17
18impl fmt::Display for Error {
19 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
20 f.write_str(match self {
21 Self::Defunct => "defunct",
22 Self::UnsupportedInterface => "unsupported interface",
23 Self::TooManyChildren => "too many children",
24 Self::IndexOutOfRange => "index out of range",
25 Self::TooManyCharacters => "too many characters",
26 Self::UnsupportedTextGranularity => "unsupported text granularity",
27 })
28 }
29}
30
31impl std::error::Error for Error {}
32
33pub type Result<T> = std::result::Result<T, Error>;