[−][src]Struct vimwiki_server::components::EnhancedListItem
Represents a wrapper around a basic list item to provide extra information and functionality without needing to implement it for ordered/unordered list item instances directly
Fields
item: ListItemattributes: HashSet<EnhancedListItemAttribute, RandomState>Implementations
impl EnhancedListItem[src]
pub fn new_with_attr(
item: ListItem,
attr: EnhancedListItemAttribute
) -> EnhancedListItem[src]
item: ListItem,
attr: EnhancedListItemAttribute
) -> EnhancedListItem
Constructs an enhanced list item with a single attribute
pub fn item(&self) -> &ListItem[src]
Returns the underlying list item
pub fn is_todo(&self) -> bool[src]
Indicates if this component has todo information
pub fn compute_todo_progress(&self) -> Option<f32>[src]
Returns percent complete in form of 0.0 == 0% and 1.0 == 100%. This is a calculated percentage based on the sublist items (if there are any) or the item itself.
This will search through all sub list items, check if they have todo properties, and calculate a sum. If none of the sublists or any series of nested sublists contains todo items that are NOT rejected and this item does also not have todo progress, None will be returned.
pub fn is_todo_incomplete(&self) -> bool[src]
Indicates whether or not this component is incomplete, meaning no progress
pub fn is_todo_partially_complete(&self) -> bool[src]
Indicates whether or not this component is partially complete (any range)
pub fn is_todo_partially_complete_1(&self) -> bool[src]
Indicates whether or not this component is partially complete (1-33%)
pub fn is_todo_partially_complete_2(&self) -> bool[src]
Indicates whether or not this component is partially complete (34-66%)
pub fn is_todo_partially_complete_3(&self) -> bool[src]
Indicates whether or not this component is partially complete (67-99%)
pub fn is_todo_complete(&self) -> bool[src]
Indicates whether or not this component is complete
pub fn is_todo_rejected(&self) -> bool[src]
Indicates whether or not this component is rejected
impl EnhancedListItem[src]
pub fn new(
item: ListItem,
attributes: HashSet<EnhancedListItemAttribute, RandomState>
) -> EnhancedListItem[src]
item: ListItem,
attributes: HashSet<EnhancedListItemAttribute, RandomState>
) -> EnhancedListItem
Methods from Deref<Target = ListItem>
pub fn is_unordered(&self) -> bool[src]
Indicates whether or not this list item represents an unordered item
pub fn is_ordered(&self) -> bool[src]
Indicates whether or not this list item represents an ordered item
pub fn to_prefix(&self) -> String[src]
Allocates a new string to represent the prefix of this list item
Trait Implementations
impl AsMut<ListItem> for EnhancedListItem[src]
impl AsRef<ListItem> for EnhancedListItem[src]
impl Clone for EnhancedListItem[src]
fn clone(&self) -> EnhancedListItem[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for EnhancedListItem[src]
impl Default for EnhancedListItem[src]
fn default() -> EnhancedListItem[src]
impl Deref for EnhancedListItem[src]
type Target = ListItem
The resulting type after dereferencing.
fn deref(&self) -> &<EnhancedListItem as Deref>::Target[src]
impl DerefMut for EnhancedListItem[src]
fn deref_mut(&mut self) -> &mut <EnhancedListItem as Deref>::Target[src]
impl<'de> Deserialize<'de> for EnhancedListItem[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<EnhancedListItem, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>, [src]
__deserializer: __D
) -> Result<EnhancedListItem, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for EnhancedListItem[src]
impl From<EnhancedListItem> for ListItem[src]
fn from(item: EnhancedListItem) -> ListItem[src]
impl From<ListItem> for EnhancedListItem[src]
fn from(item: ListItem) -> EnhancedListItem[src]
impl PartialEq<EnhancedListItem> for EnhancedListItem[src]
fn eq(&self, other: &EnhancedListItem) -> bool[src]
fn ne(&self, other: &EnhancedListItem) -> bool[src]
impl Serialize for EnhancedListItem[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer, [src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Auto Trait Implementations
impl RefUnwindSafe for EnhancedListItem
impl Send for EnhancedListItem
impl Sync for EnhancedListItem
impl Unpin for EnhancedListItem
impl UnwindSafe for EnhancedListItem
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,