Skip to main content

Slide

Struct Slide 

Source
pub struct Slide<'d> {
    pub index: usize,
    pub part: String,
    pub content: SlideContent,
    pub report: SlideReport,
    /* private fields */
}
Expand description

One parsed slide, bound to its document.

Fields§

§index: usize§part: String

The Slide part name.

§content: SlideContent§report: SlideReport

Implementations§

Source§

impl<'d> Slide<'d>

Source

pub fn number(&self) -> usize

One-based position in the deck.

Source

pub fn document(&self) -> &'d Document

Source

pub fn is_hidden(&self) -> bool

True for slides marked hidden.

Source

pub fn rels(&self) -> Result<Rc<Relationships>>

The slide’s relationships.

Source

pub fn title(&self) -> Option<String>

The first title placeholder’s text.

Source

pub fn text(&self) -> String

The slide text with default options and no notes.

Source

pub fn chart(&self, rel_id: &str) -> Result<ChartData>

The chart part behind relationship rel_id, parsed.

Source

pub fn diagram(&self, rel_id: &str) -> Result<DiagramData>

The diagram data part behind relationship rel_id, parsed.

Source

pub fn charts(&self) -> Result<Vec<(u32, ChartData)>>

Every chart on the slide with the id of its graphic frame, in z-order.

Source

pub fn diagrams(&self) -> Result<Vec<(u32, DiagramData)>>

Every diagram on the slide with the id of its graphic frame, in z-order.

Source

pub fn text_reporting( &self, options: &TextOptions, report: &mut ExtractReport, ) -> String

The slide text with options, recording problems in report.

Source

pub fn notes_part(&self) -> Result<Option<String>>

The Notes Slide part, if the slide has one.

Source

pub fn comments_part(&self) -> Result<Option<String>>

The comments part of either flavour, if the slide has one.

Source

pub fn comments(&self) -> Result<Vec<Comment>>

The slide’s comments in document order, replies after their parent.

Source

pub fn objects(&self) -> Result<Vec<ObjectRef>>

Every embedded object on the slide with its part resolved.

Source

pub fn object_bytes(&self, object: &ObjectRef) -> Result<Vec<u8>>

The bytes of an embedded object’s part.

Source

pub fn layout_part(&self) -> Result<Option<String>>

The Slide Layout part.

Source

pub fn notes(&self) -> Result<Option<TextBody>>

The speaker notes: the body placeholder of the notes slide, or, when there is none, every text shape on it other than the slide image and furniture.

Source

pub fn notes_text(&self) -> Result<Option<String>>

The speaker notes as plain text, if any.

Source

pub fn images(&self) -> Result<Vec<ImageRef>>

Every picture on the slide with its image part resolved.

Source

pub fn image_bytes(&self, image: &ImageRef) -> Result<Vec<u8>>

The bytes of an image part referenced from this slide.

The target of a hyperlink relationship: an external URL, or an internal part name.

Source§

impl Slide<'_>

Source

pub fn markdown( &self, options: &MarkdownOptions, report: &mut ExtractReport, ) -> String

This slide as Markdown, without a trailing newline; empty for a hidden slide left out.

Auto Trait Implementations§

§

impl<'d> !RefUnwindSafe for Slide<'d>

§

impl<'d> !Send for Slide<'d>

§

impl<'d> !Sync for Slide<'d>

§

impl<'d> !UnwindSafe for Slide<'d>

§

impl<'d> Freeze for Slide<'d>

§

impl<'d> Unpin for Slide<'d>

§

impl<'d> UnsafeUnpin for Slide<'d>

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<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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.