1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
use super::{AutoShape, Connector, GraphicFrame, GroupShape, OleObject, Picture, Shape};
impl Shape {
/// Get a reference to the inner `AutoShape`, if this is one.
#[inline]
#[must_use]
pub const fn as_autoshape(&self) -> Option<&AutoShape> {
match self {
Self::AutoShape(s) => Some(s),
_ => None,
}
}
/// Get a mutable reference to the inner `AutoShape`, if this is one.
#[inline]
#[must_use]
pub fn as_autoshape_mut(&mut self) -> Option<&mut AutoShape> {
match self {
Self::AutoShape(s) => Some(s),
_ => None,
}
}
/// Get a reference to the inner `Picture`, if this is one.
#[inline]
#[must_use]
pub const fn as_picture(&self) -> Option<&Picture> {
match self {
Self::Picture(s) => Some(s),
_ => None,
}
}
/// Get a mutable reference to the inner `Picture`, if this is one.
#[inline]
#[must_use]
pub fn as_picture_mut(&mut self) -> Option<&mut Picture> {
match self {
Self::Picture(s) => Some(s),
_ => None,
}
}
/// Get a reference to the inner `GraphicFrame`, if this is one.
#[inline]
#[must_use]
pub const fn as_graphic_frame(&self) -> Option<&GraphicFrame> {
match self {
Self::GraphicFrame(s) => Some(s),
_ => None,
}
}
/// Get a reference to the inner `GroupShape`, if this is one.
#[inline]
#[must_use]
pub const fn as_group(&self) -> Option<&GroupShape> {
match self {
Self::GroupShape(s) => Some(s),
_ => None,
}
}
/// Get a mutable reference to the inner `GroupShape`, if this is one.
#[inline]
#[must_use]
pub fn as_group_mut(&mut self) -> Option<&mut GroupShape> {
match self {
Self::GroupShape(s) => Some(s),
_ => None,
}
}
/// Get a reference to the inner `Connector`, if this is one.
#[inline]
#[must_use]
pub const fn as_connector(&self) -> Option<&Connector> {
match self {
Self::Connector(s) => Some(s),
_ => None,
}
}
/// Get a mutable reference to the inner `Connector`, if this is one.
#[inline]
#[must_use]
pub fn as_connector_mut(&mut self) -> Option<&mut Connector> {
match self {
Self::Connector(s) => Some(s),
_ => None,
}
}
/// Get a reference to the inner `OleObject`, if this is one.
#[inline]
#[must_use]
pub const fn as_ole_object(&self) -> Option<&OleObject> {
match self {
Self::OleObject(s) => Some(s),
_ => None,
}
}
/// Get a mutable reference to the inner `OleObject`, if this is one.
#[inline]
#[must_use]
pub fn as_ole_object_mut(&mut self) -> Option<&mut OleObject> {
match self {
Self::OleObject(s) => Some(s),
_ => None,
}
}
}