pub struct OutlineItem {
pub title: String,
pub destination: Option<Destination>,
pub children: Vec<OutlineItem>,
pub color: Option<Color>,
pub flags: OutlineFlags,
pub open: bool,
}Expand description
Outline item (bookmark)
Fields§
§title: StringItem title
destination: Option<Destination>Destination
children: Vec<OutlineItem>Child items
color: Option<Color>Text color
flags: OutlineFlagsText style flags
open: boolWhether item is open by default
Implementations§
Source§impl OutlineItem
impl OutlineItem
Sourcepub fn with_destination(self, dest: Destination) -> Self
pub fn with_destination(self, dest: Destination) -> Self
Set destination
Sourcepub fn add_child(&mut self, child: OutlineItem)
pub fn add_child(&mut self, child: OutlineItem)
Add child item
Sourcepub fn with_color(self, color: Color) -> Self
pub fn with_color(self, color: Color) -> Self
Set color
Sourcepub fn count_visible(&self) -> i64
pub fn count_visible(&self) -> i64
Count visible items (respecting open/closed state)
Trait Implementations§
Source§impl Clone for OutlineItem
impl Clone for OutlineItem
Source§fn clone(&self) -> OutlineItem
fn clone(&self) -> OutlineItem
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 moreAuto Trait Implementations§
impl Freeze for OutlineItem
impl RefUnwindSafe for OutlineItem
impl Send for OutlineItem
impl Sync for OutlineItem
impl Unpin for OutlineItem
impl UnwindSafe for OutlineItem
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