Skip to main content

RelType

Enum RelType 

Source
pub enum RelType {
Show 27 variants OfficeDocument, Slide, SlideLayout, SlideMaster, Theme, Image, NotesSlide, NotesMaster, Comments, CommentAuthors, Hyperlink, SlideRel, Chart, CustomXml, PresProps, ViewProps, TableStyles, OleObject, Video, Audio, Media, DiagramData, DiagramLayout, DiagramQuickStyle, DiagramColors, Package, Other(String),
}
Expand description

关系类型(OOXML 标准)。

列举 OOXML 规范中“办公文档“命名空间下的常用关系类型;其它类型用 RelType::Other 兜底(传 &'static str URI)。

Variants§

§

OfficeDocument

.../relationships/officeDocument:根指向演示文稿。

§

Slide

.../relationships/slide:幻灯片。

§

SlideLayout

.../relationships/slideLayout:幻灯片布局。

§

SlideMaster

.../relationships/slideMaster:幻灯片母版。

§

Theme

.../relationships/theme:主题。

§

Image

.../relationships/image:图片。

§

NotesSlide

.../relationships/notesSlide:备注页。

§

NotesMaster

.../relationships/notesMaster:备注母版(TODO-045)。

对应 /ppt/notesMasters/notesMasterN.xml,被 presentation.xml<p:notesMasterIdLst> 引用。

§

Comments

.../relationships/comments:幻灯片评论(/ppt/comments/commentN.xml)。

§

CommentAuthors

.../relationships/commentAuthors:评论作者列表(/ppt/commentAuthors.xml)。

.../relationships/hyperlink:超链接(外链)。

§

SlideRel

.../relationships/slide:幻灯片(备查别名,与 Slide 等价)。 当前未用——保留便于未来其它 part 引用。

§

Chart

.../relationships/chart:图表(路线图中)。

§

CustomXml

.../relationships/customXml:自定义 XML。

§

PresProps

.../relationships/presProps:演示文稿属性。

§

ViewProps

.../relationships/viewProps:视图属性。

§

TableStyles

.../relationships/tableStyles:表格样式。

§

OleObject

.../relationships/oleObject:OLE 对象嵌入(TODO-043)。

对应 /ppt/embeddings/oleObjectN.bin,被 slide 的 <p:oleObj r:id="..."/> 引用。 与 Image 关系配合使用:oleObj 内的 <p:pic>Image 关系引用图标图片。

§

Video

.../relationships/video:视频文件(TODO-033)。

对应 /ppt/media/mediaN.mp4(或其它视频扩展名),被 slide 的 <p:pic><p:nvPicPr><p:nvPr><a:videoFile r:link="..."/></p:nvPr> 引用。 注意:使用 r:link 而非 r:embed(视频按外部链接方式存储)。

§

Audio

.../relationships/audio:音频文件(TODO-033)。

对应 /ppt/media/mediaN.mp3(或其它音频扩展名),被 slide 的 <p:pic><p:nvPicPr><p:nvPr><a:audioFile r:link="..."/></p:nvPr> 引用。

§

Media

.../relationships/media:媒体引用(TODO-033,用于 timeline 同步)。

<p:timing> 中通过 <p:video> / <p:audio> 引用,与 Video/Audio 关系配合使用。当前库未实现 timing,仅保留 RelType 以支持 round-trip。

§

DiagramData

.../relationships/diagramData:SmartArt 数据 part(TODO-037)。

对应 /ppt/diagrams/dataN.xml,被 slide 的 <p:graphicFrame><a:graphic><a:graphicData uri="...diagram"><dgm:relIds r:dm="..."/> 引用。 与 DiagramLayout / DiagramQuickStyle / DiagramColors 一起构成 SmartArt 完整 round-trip。

§

DiagramLayout

.../relationships/diagramLayout:SmartArt 布局 part(TODO-037)。

对应 /ppt/diagrams/layoutN.xml,被 <dgm:relIds r:lo="..."/> 引用。

§

DiagramQuickStyle

.../relationships/diagramQuickStyle:SmartArt 快速样式 part(TODO-037)。

对应 /ppt/diagrams/quickStylesN.xml,被 <dgm:relIds r:qs="..."/> 引用。

§

DiagramColors

.../relationships/diagramColors:SmartArt 颜色 part(TODO-037)。

对应 /ppt/diagrams/colorsN.xml,被 <dgm:relIds r:cs="..."/> 引用。

§

Package

.../relationships/package:嵌入式包关系(TODO-004 Excel 嵌入)。

OOXML 中通用“嵌入式包“关系类型。在 pptx-rs 当前主要用于 chart 的 <c:externalData r:id="..."/> 引用嵌入式 Excel 工作簿 (/ppt/embeddings/Microsoft_Excel_WorksheetN.xlsx)。 也用于其它嵌入式包(如嵌入的 docx/pptx),但当前库仅支持 xlsx 场景。

§

Other(String)

任意其它(用字符串表达)。

Implementations§

Source§

impl RelType

Source

pub fn uri(&self) -> Cow<'_, str>

转 URI 字符串。

Trait Implementations§

Source§

impl Clone for RelType

Source§

fn clone(&self) -> RelType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RelType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for RelType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for RelType

Source§

impl Hash for RelType

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for RelType

Source§

fn eq(&self, other: &RelType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RelType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V