1use get_size2::GetSize;
4use std::fmt::{Display, Formatter};
5
6#[derive(Debug, Clone, Copy, GetSize)]
8pub enum XLinkActuate {
9 OnLoad,
11 OnRequest,
13}
14
15impl Display for XLinkActuate {
16 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
17 match self {
18 XLinkActuate::OnLoad => write!(f, "OnLoad"),
19 XLinkActuate::OnRequest => write!(f, "OnRequest"),
20 }
21 }
22}
23
24#[derive(Debug, Clone, Copy, GetSize)]
26pub enum XLinkShow {
27 New,
29 Replace,
31}
32
33impl Display for XLinkShow {
34 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
35 match self {
36 XLinkShow::New => write!(f, "new"),
37 XLinkShow::Replace => write!(f, "replace"),
38 }
39 }
40}
41
42#[derive(Debug, Clone, Copy, Default, GetSize)]
44pub enum XLinkType {
45 #[default]
47 Simple,
48 Extended,
50 Locator,
52 Arc,
54 Resource,
56 Title,
58 None,
60}
61
62impl Display for XLinkType {
63 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
64 match self {
65 XLinkType::Simple => write!(f, "simple"),
66 XLinkType::Extended => write!(f, "extended"),
67 XLinkType::Locator => write!(f, "locator"),
68 XLinkType::Arc => write!(f, "arc"),
69 XLinkType::Resource => write!(f, "resource"),
70 XLinkType::Title => write!(f, "title"),
71 XLinkType::None => write!(f, "none"),
72 }
73 }
74}