pub enum OrderedListType {
Numbers,
UpperAlpha,
LowerAlpha,
UpperRoman,
LowerRoman,
}
Expand description
The type of marker used for ordered lists.
See the “type” attribute docs for more info.
Variants§
Numbers
Decimal integers: 1, 2, 3, 4, …
This does support negative integer values, e.g., -2, -1, 0, 1, 2 …
UpperAlpha
Uppercase letters: A, B, C, D, …
LowerAlpha
Lowercase letters: a, b, c, d, …
UpperRoman
Uppercase roman numerals: I, II, III, IV, …
LowerRoman
Lowercase roman numerals: i, ii, iii, iv, …
Implementations§
Source§impl OrderedListType
impl OrderedListType
Sourcepub fn marker(&self, count: i32, separator: &str) -> String
pub fn marker(&self, count: i32, separator: &str) -> String
Returns the marker for the given count and separator character.
§Notes on behavior
- A negative or zero
count
will always return an integer number marker. - Currently, for
UpperApha
andLowerAlpha
, acount
higher than 25 will result in a wrong character. - Roman numerals >= 4000 will return an integer number marker.
Sourcepub fn from_type_attribute(s: &str) -> Option<Self>
pub fn from_type_attribute(s: &str) -> Option<Self>
Returns an ordered list type based on the given HTML type
attribute value string s
.
Returns None
if an invalid value is given.
Trait Implementations§
Source§impl Clone for OrderedListType
impl Clone for OrderedListType
Source§fn clone(&self) -> OrderedListType
fn clone(&self) -> OrderedListType
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 OrderedListType
impl Debug for OrderedListType
Source§impl Default for OrderedListType
impl Default for OrderedListType
Source§impl LiveApply for OrderedListType
impl LiveApply for OrderedListType
Source§impl LiveHook for OrderedListType
impl LiveHook for OrderedListType
fn apply_value_unknown( &mut self, cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, index: usize, nodes: &[LiveNode], ) -> usize
fn skip_apply_animator( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, _index: usize, _nodes: &[LiveNode], ) -> bool
fn apply_value_instance( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, index: usize, nodes: &[LiveNode], ) -> usize
fn skip_apply( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, _index: usize, _nodes: &[LiveNode], ) -> Option<usize>
fn before_apply( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, _index: usize, _nodes: &[LiveNode], )
fn after_apply( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, _index: usize, _nodes: &[LiveNode], )
fn after_apply_from(&mut self, cx: &mut Cx, apply: &mut Apply<'_, '_, '_>)
fn after_new_from_doc(&mut self, _cx: &mut Cx)
fn after_update_from_doc(&mut self, _cx: &mut Cx)
fn after_apply_from_doc(&mut self, _cx: &mut Cx)
fn after_new_before_apply(&mut self, _cx: &mut Cx)
Source§impl LiveNew for OrderedListType
impl LiveNew for OrderedListType
fn new(cx: &mut Cx) -> Self
fn live_type_info(cx: &mut Cx) -> LiveTypeInfo
fn live_design_with(cx: &mut Cx)
fn new_apply(
cx: &mut Cx,
apply: &mut Apply<'_, '_, '_>,
index: usize,
nodes: &[LiveNode],
) -> Selfwhere
Self: Sized,
fn new_apply_over(cx: &mut Cx, nodes: &[LiveNode]) -> Selfwhere
Self: Sized,
fn new_apply_mut_index(
cx: &mut Cx,
apply: &mut Apply<'_, '_, '_>,
index: &mut usize,
nodes: &[LiveNode],
) -> Selfwhere
Self: Sized,
fn new_from_ptr(cx: &mut Cx, live_ptr: Option<LivePtr>) -> Selfwhere
Self: Sized,
fn update_from_ptr(&mut self, cx: &mut Cx, live_ptr: Option<LivePtr>)
fn update_from_ptr_with_scope( &mut self, cx: &mut Cx, live_ptr: Option<LivePtr>, scope: &mut Scope<'_, '_>, )
fn new_from_ptr_with_scope(
cx: &mut Cx,
live_ptr: Option<LivePtr>,
scope: &mut Scope<'_, '_>,
) -> Selfwhere
Self: Sized,
fn new_main(cx: &mut Cx) -> Option<Self>where
Self: Sized,
fn register_main_module(cx: &mut Cx)
fn update_main(&mut self, cx: &mut Cx)
fn new_local(cx: &mut Cx) -> Selfwhere
Self: Sized,
fn new_from_module(
cx: &mut Cx,
module_id: LiveModuleId,
id: LiveId,
) -> Option<Self>where
Self: Sized,
fn update_from_module( &mut self, cx: &mut Cx, module_id: LiveModuleId, id: LiveId, )
impl Copy for OrderedListType
Auto Trait Implementations§
impl Freeze for OrderedListType
impl RefUnwindSafe for OrderedListType
impl Send for OrderedListType
impl Sync for OrderedListType
impl Unpin for OrderedListType
impl UnwindSafe for OrderedListType
Blanket Implementations§
Source§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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