pub struct Session {
pub comments: Vec<Comment>,
pub viewed: BTreeMap<String, String>,
}Fields§
§comments: Vec<Comment>§viewed: BTreeMap<String, String>Per-file viewed marks: path -> content hash of the new side at the time of marking. A changed hash means the file needs re-review.
Implementations§
Source§impl Session
impl Session
pub fn add_comment( &mut self, author: &str, anchor: Anchor, body: &str, ) -> &Comment
pub fn reply(&mut self, comment_id: &str, author: &str, body: &str) -> bool
pub fn resolve(&mut self, comment_id: &str) -> bool
Sourcepub fn edit_comment(&mut self, comment_id: &str, body: &str) -> bool
pub fn edit_comment(&mut self, comment_id: &str, body: &str) -> bool
Replace a comment’s body in place (status, replies, and anchor are kept).
pub fn unresolved_comments(&self) -> impl Iterator<Item = &Comment>
pub fn mark_viewed(&mut self, path: &str, hash: &str)
pub fn unmark_viewed(&mut self, path: &str)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
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
impl Eq for Session
impl StructuralPartialEq for Session
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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