Skip to main content

Sld

Struct Sld 

Source
pub struct Sld {
    pub id: u32,
    pub layout_rid: String,
    pub name: String,
    pub background: Option<SlideBackground>,
    pub shapes: Vec<SlideShape>,
    pub notes: Option<TextBody>,
    pub transition: Option<Transition>,
    pub ext_lst: Option<ExtensionList>,
}
Expand description

一张幻灯片。

Fields§

§id: u32

内部 ID(id="256" 等)。

§layout_rid: String

slide 关系 id(指向 slideLayoutN.xml)。

§name: String

用户可读的 slide 名(对应 <p:sld>/<p:cSld>/@name,可选)。

对标 python-pptx Slide.name。空字符串表示未命名。 序列化时若非空,写到 <p:cSld name="...">

§background: Option<SlideBackground>

幻灯片背景(<p:bg>)。None 表示遵循母版背景。

§shapes: Vec<SlideShape>

幻灯片中的形状列表。

§notes: Option<TextBody>

备注(notes)。

§transition: Option<Transition>

幻灯片过渡(<p:transition>,可选)。

§ext_lst: Option<ExtensionList>

形状树(spTree)末尾的扩展列表。

Implementations§

Source§

impl Sld

Source

pub fn to_xml(&self) -> String

写 XML。

Source

pub fn set_layout_rid(&mut self, rid: String)

设置 layout 关系 id(指向 ppt/slideLayouts/slideLayoutN.xml)。

Presentation::from_opc 在 read 路径里 从 slideN.xml.rels 解析出 SlideLayout 关系后回填。

Trait Implementations§

Source§

impl Clone for Sld

Source§

fn clone(&self) -> Sld

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 Sld

Source§

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

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

impl Default for Sld

Source§

fn default() -> Sld

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Sld

§

impl RefUnwindSafe for Sld

§

impl Send for Sld

§

impl Sync for Sld

§

impl Unpin for Sld

§

impl UnsafeUnpin for Sld

§

impl UnwindSafe for Sld

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<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, 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