pub struct SectionManager { /* private fields */ }Expand description
Manages sections across the presentation
Implementations§
Source§impl SectionManager
impl SectionManager
pub fn new() -> Self
Sourcepub fn add_section(
&mut self,
name: &str,
first_slide: usize,
slide_count: usize,
) -> Result<(), String>
pub fn add_section( &mut self, name: &str, first_slide: usize, slide_count: usize, ) -> Result<(), String>
Add a section. Returns error if it overlaps with existing sections.
Sourcepub fn remove_section(&mut self, name: &str) -> bool
pub fn remove_section(&mut self, name: &str) -> bool
Remove a section by name
Sourcepub fn get_section(&self, name: &str) -> Option<&SlideSection>
pub fn get_section(&self, name: &str) -> Option<&SlideSection>
Get section by name
Sourcepub fn section_for_slide(&self, slide_index: usize) -> Option<&SlideSection>
pub fn section_for_slide(&self, slide_index: usize) -> Option<&SlideSection>
Find which section a slide belongs to
Sourcepub fn sections(&self) -> &[SlideSection]
pub fn sections(&self) -> &[SlideSection]
Get all sections
Sourcepub fn rename_section(&mut self, old_name: &str, new_name: &str) -> bool
pub fn rename_section(&mut self, old_name: &str, new_name: &str) -> bool
Rename a section. Returns false if not found.
Trait Implementations§
Source§impl Clone for SectionManager
impl Clone for SectionManager
Source§fn clone(&self) -> SectionManager
fn clone(&self) -> SectionManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SectionManager
impl Debug for SectionManager
Source§impl Default for SectionManager
impl Default for SectionManager
Source§fn default() -> SectionManager
fn default() -> SectionManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SectionManager
impl RefUnwindSafe for SectionManager
impl Send for SectionManager
impl Sync for SectionManager
impl Unpin for SectionManager
impl UnwindSafe for SectionManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more