pub struct ReviewSession { /* private fields */ }Implementations§
Source§impl ReviewSession
impl ReviewSession
pub fn new(document: Arc<DiffDocument>) -> Self
pub fn with_options( document: Arc<DiffDocument>, options: SessionOptions, ) -> Self
pub const fn document(&self) -> &Arc<DiffDocument> ⓘ
pub const fn presentation(&self) -> &DiffPresentation
pub const fn review(&self) -> &Review
pub const fn review_mut(&mut self) -> &mut Review
pub const fn view_mode(&self) -> ViewMode
pub const fn layout(&self) -> Layout
pub fn selected_file(&self) -> Option<usize>
pub fn selected_row(&self) -> Option<usize>
pub const fn selected_side(&self) -> DiffSide
pub fn selected_file_range(&self) -> Option<Range<usize>>
pub const fn draft(&self) -> Option<&CommentDraft>
pub const fn draft_mut(&mut self) -> Option<&mut CommentDraft>
pub const fn projection_revision(&self) -> u64
pub fn selected_source_line(&self) -> Option<SourceLocation>
pub fn reveal_selected_gap(&mut self, amount: RevealAmount) -> bool
pub fn toggle_full_file(&mut self) -> bool
Sourcepub fn set_document(&mut self, document: Arc<DiffDocument>)
pub fn set_document(&mut self, document: Arc<DiffDocument>)
Replaces the complete immutable document while preserving review and view state, including gap expansions for files whose content did not change.
pub fn set_view_mode(&mut self, mode: ViewMode) -> bool
pub fn cycle_view_mode(&mut self) -> bool
pub fn set_split_when_auto(&mut self, split: bool) -> bool
pub fn clear_review(&mut self)
pub fn select_file(&mut self, index: usize) -> bool
pub fn move_file(&mut self, delta: isize) -> Option<usize>
pub fn move_row(&mut self, delta: isize)
pub fn select_boundary(&mut self, end: bool)
pub fn select_row(&mut self, index: usize) -> bool
pub fn hunk_target(&self, delta: isize) -> Option<usize>
pub fn move_hunk(&mut self, delta: isize) -> bool
pub fn set_selected_side(&mut self, side: DiffSide) -> bool
pub fn selected_presented_row(&self) -> Option<&PresentedRow>
pub fn selected_cell(&self) -> Option<&PresentedCell>
pub fn selected_anchor(&self) -> Option<LineAnchor>
pub fn comment_id_at_selection(&self) -> Option<u64>
pub fn last_comment_id(&self) -> Option<u64>
pub fn begin_draft(&mut self, editing: Option<u64>) -> bool
pub fn edit_comment_at_selection(&mut self) -> bool
pub fn undo_last_comment(&mut self) -> bool
pub fn cancel_draft(&mut self)
pub fn submit_draft(&mut self) -> Option<u64>
pub fn delete_comment_at_selection(&mut self) -> bool
pub fn submission(&self) -> ReviewSubmission
Trait Implementations§
Source§impl Clone for ReviewSession
impl Clone for ReviewSession
Source§fn clone(&self) -> ReviewSession
fn clone(&self) -> ReviewSession
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReviewSession
impl RefUnwindSafe for ReviewSession
impl Send for ReviewSession
impl Sync for ReviewSession
impl Unpin for ReviewSession
impl UnsafeUnpin for ReviewSession
impl UnwindSafe for ReviewSession
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