Skip to main content

Slide

Struct Slide 

Source
pub struct Slide<'a> {
    pub element: &'a Element,
    pub name: Option<&'a str>,
    pub master_page: Option<&'a str>,
    pub position: usize,
}
Expand description

One slide.

Fields§

§element: &'a Element

The draw:page element and everything on it.

§name: Option<&'a str>

The slide’s name, where it has one. An application generates page1 and so on for slides nobody has named.

§master_page: Option<&'a str>

The master page it takes its background and placeholders from.

§position: usize

Where the draw:page sits among the body’s children, so that the slide can be reached again for changing without holding a reference.

Implementations§

Source§

impl Slide<'_>

Source

pub fn style_name(&self) -> Option<&str>

The drawing-page style the slide names, which carries its background and the switches over what its master gives it.

Source

pub fn notes(&self) -> Option<&Element>

The speaker’s notes, which ODF keeps in a presentation:notes element on the page rather than in a part of its own.

Source

pub fn shapes(&self) -> impl Iterator<Item = &Element>

The shapes on the slide: every child that is not the notes.

Order is drawing order, back to front, which is the order ODF writes them in and the order they have to be drawn in.

Source

pub fn shapes_indexed(&self) -> impl Iterator<Item = (usize, &Element)>

The shapes with their index among the page’s children, which is what Presentation::set_geometry takes.

Auto Trait Implementations§

§

impl<'a> Freeze for Slide<'a>

§

impl<'a> RefUnwindSafe for Slide<'a>

§

impl<'a> Send for Slide<'a>

§

impl<'a> Sync for Slide<'a>

§

impl<'a> Unpin for Slide<'a>

§

impl<'a> UnsafeUnpin for Slide<'a>

§

impl<'a> UnwindSafe for Slide<'a>

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.