pub struct OrderedList { /* private fields */ }Expand description
Represents an ordered list
Implementations§
Source§impl OrderedList
impl OrderedList
Sourcepub fn new(style: OrderedListStyle) -> Self
pub fn new(style: OrderedListStyle) -> Self
Create a new ordered list
Sourcepub fn set_start_number(&mut self, start: u32) -> &mut Self
pub fn set_start_number(&mut self, start: u32) -> &mut Self
Set the starting number
Sourcepub fn set_options(&mut self, options: ListOptions) -> &mut Self
pub fn set_options(&mut self, options: ListOptions) -> &mut Self
Set list options
Sourcepub fn set_position(&mut self, x: f64, y: f64) -> &mut Self
pub fn set_position(&mut self, x: f64, y: f64) -> &mut Self
Set list position
Sourcepub fn add_item_with_children(
&mut self,
text: String,
children: Vec<ListElement>,
) -> &mut Self
pub fn add_item_with_children( &mut self, text: String, children: Vec<ListElement>, ) -> &mut Self
Add an item with nested lists
Sourcepub fn get_height(&self) -> f64
pub fn get_height(&self) -> f64
Calculate the total height of the list
Trait Implementations§
Source§impl Clone for OrderedList
impl Clone for OrderedList
Source§fn clone(&self) -> OrderedList
fn clone(&self) -> OrderedList
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 OrderedList
impl RefUnwindSafe for OrderedList
impl Send for OrderedList
impl Sync for OrderedList
impl Unpin for OrderedList
impl UnwindSafe for OrderedList
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more