Struct somedoc::model::block::List [−][src]
A list is either a bulleted or unordered set of values, or an enumerated list of values.
A List
is a tree structure with ListItem
being the inner nodes in the tree
and which may contain either another list, or a Item
.
Implementations
impl List
[src]
pub fn new(kind: ListKind) -> Self
[src]
Create a new list of the provided kind
.
pub fn ordered() -> Self
[src]
Create a new ordered/numbered item list.
pub fn unordered() -> Self
[src]
Create a new unordered/bulleted item list.
pub fn has_inner(&self) -> bool
[src]
Returns true if this list contains any items or sub-lists.
pub fn inner(&self) -> &Vec<ListItem>
[src]
Return the vector of list items or sub-lists.
pub fn add_item(&mut self, item: Item) -> &mut Self
[src]
Add a new item to this list.
pub fn add_item_str(&mut self, item: &str) -> &mut Self
[src]
Add a new item to this list.
pub fn add_item_from(&mut self, item: InlineContent) -> &mut Self
[src]
Add a new item to this list from the provided content.
pub fn add_sub_list(&mut self, item: List) -> &mut Self
[src]
pub fn is_ordered(&self) -> bool
[src]
Return true
if this is an ordered/numbered item list, else false
.
pub fn is_unordered(&self) -> bool
[src]
Return true
if this is an unordered/bulleted item list, else false
.
pub fn kind(&self) -> &ListKind
[src]
Return the kind of this list.
Trait Implementations
impl Clone for List
[src]
impl Debug for List
[src]
impl Default for List
[src]
impl<'de> Deserialize<'de> for List
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl From<List> for ListItem
[src]
impl HasLabel for List
[src]
fn has_label(&self) -> bool
[src]
fn label(&self) -> &Option<Label>
[src]
fn set_label(&mut self, label: Label) -> &mut Self
[src]
fn unset_label(&mut self) -> &mut Self
[src]
impl Into<BlockContent> for List
[src]
fn into(self) -> BlockContent
[src]
impl Serialize for List
[src]
Auto Trait Implementations
impl RefUnwindSafe for List
[src]
impl Send for List
[src]
impl Sync for List
[src]
impl Unpin for List
[src]
impl UnwindSafe for List
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,