pub struct Thread<T = Comment> { /* private fields */ }Expand description
A discussion thread.
Implementations§
Source§impl<T> Thread<T>
impl<T> Thread<T>
pub fn new(id: CommentId, comment: T) -> Self
pub fn is_initialized(&self) -> bool
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn comment(&self, id: &CommentId) -> Option<&T>
pub fn root(&self) -> Option<(&CommentId, &T)>
pub fn first(&self) -> Option<(&CommentId, &T)>
pub fn last(&self) -> Option<(&CommentId, &T)>
pub fn comments(&self) -> impl DoubleEndedIterator<Item = (&CommentId, &T)> + '_
pub fn timeline(&self) -> impl DoubleEndedIterator<Item = &EntryId> + '_
Trait Implementations§
Source§impl Cob for Thread
impl Cob for Thread
Source§impl<T> CobWithType for Thread<T>
impl<T> CobWithType for Thread<T>
Source§impl<'de, T> Deserialize<'de> for Thread<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Thread<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<R: ReadRepository> Evaluate<R> for Thread
impl<R: ReadRepository> Evaluate<R> for Thread
impl<T: Eq> Eq for Thread<T>
impl<T> StructuralPartialEq for Thread<T>
Auto Trait Implementations§
impl<T> Freeze for Thread<T>
impl<T> RefUnwindSafe for Thread<T>where
T: RefUnwindSafe,
impl<T> Send for Thread<T>where
T: Send,
impl<T> Sync for Thread<T>where
T: Sync,
impl<T> Unpin for Thread<T>
impl<T> UnwindSafe for Thread<T>where
T: RefUnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.