ppt_rs/types.rs
1//! Abstract types and traits used by pptx library
2
3use crate::util::Length;
4
5/// A trait for objects that have width and height extents
6pub trait ProvidesExtents {
7 /// Distance between left and right extents of shape in EMUs
8 fn width(&self) -> Length;
9
10 /// Distance between top and bottom extents of shape in EMUs
11 fn height(&self) -> Length;
12}
13
14/// A trait for objects that provide access to their XmlPart
15pub trait ProvidesPart {
16 /// Get the XmlPart for this object
17 fn part(&self) -> &dyn std::any::Any;
18}