pub struct Emu(pub i64);Expand description
EMU(English Metric Unit),所有内部几何计算都使用 i64 形式的 EMU。
EMU 在 OOXML 中是绝对整数,可保证精度无损;库内任何“宽 / 高 / 偏移 / 行高 / 列宽“
字段均以本类型为内部表示。NewType 包装的 i64 同时:
- 提供
value()/new()与 f64 单位的双向换算; - 暴露
+/-/*等运算符便于几何计算; - 实现
Copy + Default + Ord,可直接作为BTreeMapkey。
Tuple Fields§
§0: i64EMU 数值(可为负)。
Implementations§
Trait Implementations§
impl Copy for Emu
impl Eq for Emu
Source§impl Ord for Emu
impl Ord for Emu
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Emu
impl PartialOrd for Emu
impl StructuralPartialEq for Emu
Auto Trait Implementations§
impl Freeze for Emu
impl RefUnwindSafe for Emu
impl Send for Emu
impl Sync for Emu
impl Unpin for Emu
impl UnsafeUnpin for Emu
impl UnwindSafe for Emu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.