Skip to main content

ParsedPresentation

Struct ParsedPresentation 

Source
pub struct ParsedPresentation { /* private fields */ }
Expand description

A presentation parsed once with artwork deferred, kept for rendering many nodes on demand.

Besides the deferred model, the handle retains the inflated slide, layout, master and theme parts with their XML trees, relationships, color maps and related chart, diagram, ink and control parts, so a render never reads the archive again. Each render parses only the node list that can hold the target and renders the one node; the result equals the eager parse’s artwork for that node and what render_node_artwork returns. The handle is larger than the model alone and is not Sync; drop it when the viewer closes the presentation.

Implementations§

Source§

impl ParsedPresentation

Source

pub fn document(&self) -> &PresentationDocument

The model, as parse_presentation_with_options returns it with defer_artwork set.

Source

pub fn into_document(self) -> PresentationDocument

Gives up the retained state and keeps the model.

Source

pub fn render_node_artwork( &self, target: &ArtworkTarget, ) -> Result<Option<NodeArtwork>, ParseError>

Renders the artwork of one node from the retained state, or None when the node has none or does not exist. Legacy binary presentations have no generated artwork and always yield None.

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